diff --git a/src/tmp/wokkel/mam.py b/src/tmp/wokkel/mam.py index dd81deaf..4dbf59c0 100644 --- a/src/tmp/wokkel/mam.py +++ b/src/tmp/wokkel/mam.py @@ -33,6 +33,7 @@ from zope.interface import Interface from twisted.words.protocols.jabber import xmlstream from twisted.words.xish import domish from twisted.words.protocols.jabber import jid +from twisted.words.protocols.jabber import error from twisted.internet import defer from twisted.python import log @@ -53,10 +54,14 @@ PREFS_SET_REQUEST = "/iq[@type='set']/prefs[@xmlns='%s']" % NS_MAM # TODO: add the tests! -class MAMError(Exception): + +class MAMError(error.StanzaError): """ MAM error. """ + def __init__(self, text=None): + error.StanzaError.__init__(self, 'bad-request', text=text) + class Unsupported(MAMError): def __init__(self, feature, text=None):