comparison src/core/xmpp.py @ 1061:3700165d68dc

core (xmpp): onMessage handles an eventual subject (used for announcement / headline message)
author souliane <souliane@mailoo.org>
date Mon, 02 Jun 2014 19:25:06 +0200
parents aa15453ec54d
children b29452cab50b
comparison
equal deleted inserted replaced
1060:aa15453ec54d 1061:3700165d68dc
124 "extra": {}} 124 "extra": {}}
125 125
126 for e in message.elements(): 126 for e in message.elements():
127 if e.name == "body": 127 if e.name == "body":
128 data['body'] = e.children[0] if e.children else "" 128 data['body'] = e.children[0] if e.children else ""
129 break 129 elif e.name == "subject" and e.children:
130 data['extra']['subject'] = e.children[0]
130 131
131 data['type'] = message['type'] if message.hasAttribute('type') else 'normal' 132 data['type'] = message['type'] if message.hasAttribute('type') else 'normal'
132 133
133 def bridgeSignal(data): 134 def bridgeSignal(data):
134 if data is not None: 135 if data is not None: