Merge lp:~mgorven/ibid/jabber-muc-identity into lp:~ibid-core/ibid/old-release-0.1-1.6

Proposed by Michael Gorven
Status: Merged
Approved by: Stefano Rivera
Approved revision: 909
Merged at revision: 943
Proposed branch: lp:~mgorven/ibid/jabber-muc-identity
Merge into: lp:~ibid-core/ibid/old-release-0.1-1.6
Diff against target: 14 lines (+3/-2)
1 file modified
ibid/source/jabber.py (+3/-2)
To merge this branch: bzr merge lp:~mgorven/ibid/jabber-muc-identity
Reviewer Review Type Date Requested Status
Ibid Core Team Pending
Review via email: mp+27184@code.launchpad.net

Description of the change

Fix real JID detection when more than one 'x' element is received.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'ibid/source/jabber.py'
2--- ibid/source/jabber.py 2010-02-26 09:43:45 +0000
3+++ ibid/source/jabber.py 2010-06-09 17:05:40 +0000
4@@ -102,8 +102,9 @@
5 priority = 0
6
7 realjid = None
8- if presence.x and presence.x.defaultUri == 'http://jabber.org/protocol/muc#user' and presence.x.item.hasAttribute('jid'):
9- realjid = JID(presence.x.item["jid"])
10+ for mucuser in presence.elements(name='x', uri='http://jabber.org/protocol/muc#user'):
11+ if mucuser.item.hasAttribute('jid'):
12+ realjid = JID(mucuser.item["jid"])
13
14 self.availableReceived(entity, show, statuses, priority, realjid)
15

Subscribers

People subscribed via source and target branches