diff 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
line wrap: on
line diff
--- a/src/core/xmpp.py	Fri May 23 09:59:35 2014 +0200
+++ b/src/core/xmpp.py	Mon Jun 02 19:25:06 2014 +0200
@@ -126,7 +126,8 @@
         for e in message.elements():
             if e.name == "body":
                 data['body'] = e.children[0] if e.children else ""
-                break
+            elif e.name == "subject" and e.children:
+                data['extra']['subject'] = e.children[0]
 
         data['type'] = message['type'] if message.hasAttribute('type') else 'normal'