diff options
author | Nathan Fritz <fritzy@netflint.net> | 2010-01-05 21:56:48 +0000 |
---|---|---|
committer | Nathan Fritz <fritzy@netflint.net> | 2010-01-05 21:56:48 +0000 |
commit | 093644ffbd6708121150c92359bce60408f924bb (patch) | |
tree | a7d6da57ff76a8e54b1ec3703aeffeed82f34fa1 /sleekxmpp/stanza/message.py | |
parent | 805afa4bc1f44598d786fddc92c5129c62464227 (diff) | |
download | slixmpp-093644ffbd6708121150c92359bce60408f924bb.tar.gz slixmpp-093644ffbd6708121150c92359bce60408f924bb.tar.bz2 slixmpp-093644ffbd6708121150c92359bce60408f924bb.tar.xz slixmpp-093644ffbd6708121150c92359bce60408f924bb.zip |
* major stanza improvements
* raise XMPPError in handler to reply with error stanza
* started work on pubsub stanzas
Diffstat (limited to 'sleekxmpp/stanza/message.py')
-rw-r--r-- | sleekxmpp/stanza/message.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/sleekxmpp/stanza/message.py b/sleekxmpp/stanza/message.py index d75421c8..c8d54f13 100644 --- a/sleekxmpp/stanza/message.py +++ b/sleekxmpp/stanza/message.py @@ -1,8 +1,9 @@ from .. xmlstream.stanzabase import StanzaBase from xml.etree import cElementTree as ET from . error import Error +from . rootstanza import RootStanza -class Message(StanzaBase): +class Message(RootStanza): interfaces = set(('type', 'to', 'from', 'id', 'body', 'subject')) types = set((None, 'normal', 'chat', 'headline', 'error', 'groupchat')) sub_interfaces = set(('body', 'subject')) @@ -27,11 +28,3 @@ class Message(StanzaBase): self['body'] = body return self - def exception(self, text): - self.reply() - self['error']['condition'] = 'undefined-condition' - self['error']['text'] = text - self.send() - -Message.plugin_attrib_map['error'] = Error -Message.plugin_tag_map["{%s}%s" % (Error.namespace, Error.name)] = Error |