summaryrefslogtreecommitdiff
path: root/sleekxmpp/basexmpp.py
diff options
context:
space:
mode:
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