diff src/plugins/plugin_xep_0277.py @ 1829:6079752ffeae

plugin XEP-0060, XEP-0277: added getNodeURI method
author Goffi <goffi@goffi.org>
date Sat, 23 Jan 2016 19:53:16 +0100
parents 1424cc6f8e98
children 68c0dc13d821
line wrap: on
line diff
--- a/src/plugins/plugin_xep_0277.py	Fri Jan 22 21:06:41 2016 +0100
+++ b/src/plugins/plugin_xep_0277.py	Sat Jan 23 19:53:16 2016 +0100
@@ -533,10 +533,7 @@
             if 'comments_node' in mb_data or 'comments_service' in mb_data:
                 raise exceptions.DataError(u"You can't use comments_service/comments_node and comments at the same time")
         else:
-            mb_data['comments'] = u"xmpp:%(service)s?%(query)s" % {
-                'service': comments_service.userhost(),
-                'query': urllib.urlencode([('node', comments_node.encode('utf-8'))])
-                }
+            mb_data['comments'] = self._p.getNodeURI(comments_service, comments_node)
 
     def _mbSend(self, service, node, data, profile_key):
         service = jid.JID(service) if service else None