changeset 0134934a46bf in /home/hg/repos/gajim

details:http://hg.gajim.org/gajim?cmd=changeset;node=0134934a46bf
description: [Zash] support latest version of XEP-0258. Fixes #7010

diffstat:

 src/common/connection.py          |   3 ++-
 src/common/connection_handlers.py |  10 +++-------
 src/common/xmpp/protocol.py       |   2 +-
 3 files changed, 6 insertions(+), 9 deletions(-)

diffs (48 lines):

diff -r 824b54a64fea -r 0134934a46bf src/common/connection.py
--- a/src/common/connection.py  Fri Oct 07 17:51:57 2011 +0200
+++ b/src/common/connection.py  Fri Oct 07 17:57:24 2011 +0200
@@ -2065,7 +2065,8 @@
         if not gajim.account_is_connected(self.name):
             return
         self.seclabel_catalogue_request(to, callback)
-        iq = common.xmpp.Iq(typ='get')
+        server = gajim.get_jid_from_account(self.name).split("@")[1] # Really, 
no better way?
+        iq = common.xmpp.Iq(typ='get', to=server)
         iq2 = iq.addChild(name='catalog', 
namespace=common.xmpp.NS_SECLABEL_CATALOG)
         iq2.setAttr('to', to)
         self.connection.send(iq)
diff -r 824b54a64fea -r 0134934a46bf src/common/connection_handlers.py
--- a/src/common/connection_handlers.py Fri Oct 07 17:51:57 2011 +0200
+++ b/src/common/connection_handlers.py Fri Oct 07 17:57:24 2011 +0200
@@ -1414,16 +1414,12 @@
         log.debug('SecLabelCB')
         query = iq_obj.getTag('catalog')
         to = query.getAttr('to')
-        items = query.getTags('securitylabel')
+        items = query.getTags('item')
         labels = {}
         ll = []
         for item in items:
-            display_tag = item.getTag('displaymarking')
-            if display_tag:
-                label = display_tag.getData()
-            else:
-                label = ''
-            labels[label] = item
+            label = item.getAttr('selector')
+            labels[label] = item.getTag('securitylabel')
             ll.append(label)
         if to not in self.seclabel_catalogues:
             self.seclabel_catalogues[to] = [[], None, None]
diff -r 824b54a64fea -r 0134934a46bf src/common/xmpp/protocol.py
--- a/src/common/xmpp/protocol.py       Fri Oct 07 17:51:57 2011 +0200
+++ b/src/common/xmpp/protocol.py       Fri Oct 07 17:57:24 2011 +0200
@@ -119,7 +119,7 @@
 NS_RSM            = 'http://jabber.org/protocol/rsm'
 NS_SASL           = 'urn:ietf:params:xml:ns:xmpp-sasl'
 NS_SECLABEL       = 'urn:xmpp:sec-label:0'
-NS_SECLABEL_CATALOG = 'urn:xmpp:sec-label:catalog:0'
+NS_SECLABEL_CATALOG = 'urn:xmpp:sec-label:catalog:2'
 NS_SEARCH         = 'jabber:iq:search'
 NS_SERVER         = 'jabber:server'
 NS_SESSION        = 'urn:ietf:params:xml:ns:xmpp-session'
_______________________________________________
Commits mailing list
[email protected]
http://lists.gajim.org/cgi-bin/listinfo/commits

Reply via email to