summaryrefslogtreecommitdiff
path: root/sleekxmpp/basexmpp.py
diff options
context:
space:
mode:
authorNathan Fritz <fritzy@netflint.net>2009-12-10 07:33:59 +0000
committerNathan Fritz <fritzy@netflint.net>2009-12-10 07:33:59 +0000
commita031dd24a6c82745b7272d98229ebc69dd5f4811 (patch)
tree6fa65ae73a2faafe98cf8bfab24f92ed6bcc1ec0 /sleekxmpp/basexmpp.py
parent007b04dd3086a0b02865c924022db70bbd47445e (diff)
downloadslixmpp-a031dd24a6c82745b7272d98229ebc69dd5f4811.tar.gz
slixmpp-a031dd24a6c82745b7272d98229ebc69dd5f4811.tar.bz2
slixmpp-a031dd24a6c82745b7272d98229ebc69dd5f4811.tar.xz
slixmpp-a031dd24a6c82745b7272d98229ebc69dd5f4811.zip
tweaked stanzas for easy use
Diffstat (limited to 'sleekxmpp/basexmpp.py')
-rw-r--r--sleekxmpp/basexmpp.py38
1 files changed, 20 insertions, 18 deletions
diff --git a/sleekxmpp/basexmpp.py b/sleekxmpp/basexmpp.py
index 0f4f799c..0eeb52e8 100644
--- a/sleekxmpp/basexmpp.py
+++ b/sleekxmpp/basexmpp.py
@@ -354,24 +354,26 @@ class basexmpp(object):
return fulljid.split('/', 1)[0]
def _handleMessage(self, msg):
- xml = msg.xml
- ns = xml.tag.split('}')[0]
- if ns == 'message':
- ns = ''
- else:
- ns = "%s}" % ns
- mfrom = xml.attrib['from']
- message = xml.find('%sbody' % ns).text
- subject = xml.find('%ssubject' % ns)
- if subject is not None:
- subject = subject.text
- else:
- subject = ''
- resource = self.getjidresource(mfrom)
- mfrom = self.getjidbare(mfrom)
- mtype = xml.attrib.get('type', 'normal')
- name = self.roster.get('name', '')
- self.event("message", {'jid': mfrom, 'resource': resource, 'name': name, 'type': mtype, 'subject': subject, 'message': message, 'to': xml.attrib.get('to', '')})
+ self.event('message', msg)
+ #xml = msg.xml
+ #ns = xml.tag.split('}')[0]
+ #if ns == 'message':
+ # ns = ''
+ #else:
+ # ns = "%s}" % ns
+ #mfrom = xml.attrib['from']
+ #message = xml.find('%sbody' % ns).text
+ #subject = xml.find('%ssubject' % ns)
+ #if subject is not None:
+ # subject = subject.text
+ #else:
+ # subject = ''
+ #resource = self.getjidresource(mfrom)
+ #mfrom = self.getjidbare(mfrom)
+ #mtype = xml.attrib.get('type', 'normal')
+ #name = self.roster.get('name', '')
+ #self.event("message", {'jid': mfrom, 'resource': resource, 'name': name, 'type': mtype, 'subject': subject, 'message': message, 'to': xml.attrib.get('to', '')})
+
def _handlePresence(self, presence):
xml = presence.xml