summaryrefslogtreecommitdiff
path: root/sleekxmpp/stanza/message.py
diff options
context:
space:
mode:
authorNathan Fritz <fritzy@netflint.net>2009-12-11 01:29:46 +0000
committerNathan Fritz <fritzy@netflint.net>2009-12-11 01:29:46 +0000
commit8854509ccdbc1f9ea74e1eb00f3af098f2a3b6b6 (patch)
tree0cd10d2532fe57cf49128779bbc2375875afb8b0 /sleekxmpp/stanza/message.py
parenta031dd24a6c82745b7272d98229ebc69dd5f4811 (diff)
downloadslixmpp-8854509ccdbc1f9ea74e1eb00f3af098f2a3b6b6.tar.gz
slixmpp-8854509ccdbc1f9ea74e1eb00f3af098f2a3b6b6.tar.bz2
slixmpp-8854509ccdbc1f9ea74e1eb00f3af098f2a3b6b6.tar.xz
slixmpp-8854509ccdbc1f9ea74e1eb00f3af098f2a3b6b6.zip
* started converstion to stanza objects
Diffstat (limited to 'sleekxmpp/stanza/message.py')
-rw-r--r--sleekxmpp/stanza/message.py21
1 files changed, 3 insertions, 18 deletions
diff --git a/sleekxmpp/stanza/message.py b/sleekxmpp/stanza/message.py
index 3f9eb2ba..999f7924 100644
--- a/sleekxmpp/stanza/message.py
+++ b/sleekxmpp/stanza/message.py
@@ -1,5 +1,6 @@
from .. xmlstream.stanzabase import StanzaBase
from xml.etree import cElementTree as ET
+from . error import Error
class Message(StanzaBase):
interfaces = set(('type', 'to', 'from', 'id', 'body', 'subject'))
@@ -25,21 +26,5 @@ class Message(StanzaBase):
self['body'] = body
return self
-if __name__ == '__main__':
- m = Message()
- m['to'] = 'me'
- m['from'] = 'you'
- m['type'] = 'chat'
- m.reply()
- m['body'] = 'Hello there!'
- m['subject'] = 'whatever'
- m['id'] = 'abc'
- print(str(m))
- print(m['body'])
- print(m['subject'])
- print(m['id'])
- m['type'] = None
- m['body'] = None
- m['id'] = None
- print(str(m))
- print(m['type'])
+Message.plugin_attrib_map['error'] = Error
+Message.plugin_tag_map["{%s}%s" % (Error.namespace, Error.name)] = Error