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

Proposed by Michael Gorven
Status: Merged
Approved by: Jonathan Hitchcock
Approved revision: 909
Merged at revision: 946
Proposed branch: lp:~mgorven/ibid/jabber-muc-identity
Merge into: lp:~ibid-core/ibid/old-trunk-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
Jonathan Hitchcock Approve
Stefano Rivera Approve
Review via email: mp+27182@code.launchpad.net

Commit message

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

Description of the change

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

To post a comment you must log in.
Revision history for this message
Stefano Rivera (stefanor) wrote :

I'm no XMPP expert, but seems reasonable enough.

I assume you've tested this with Gmail (which needs that realjid IIRC)

review: Approve
Revision history for this message
Michael Gorven (mgorven) wrote :

> I assume you've tested this with Gmail (which needs that realjid IIRC)

Yup. The realjid isn't Gmail specific (although this fix is because it's
broken on Gmail).

Revision history for this message
Jonathan Hitchcock (vhata) :
review: Approve

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:00:55 +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