diff cagou/plugins/plugin_wid_contact_list.py @ 268:520fd0f50233

contact list: fixed crash with pb on addContact and delContact
author Goffi <goffi@goffi.org>
date Mon, 11 Mar 2019 20:27:25 +0100
parents ff1efdeff53f
children 1b835bcfa663
line wrap: on
line diff
--- a/cagou/plugins/plugin_wid_contact_list.py	Mon Mar 11 20:24:04 2019 +0100
+++ b/cagou/plugins/plugin_wid_contact_list.py	Mon Mar 11 20:27:25 2019 +0100
@@ -67,7 +67,7 @@
         if not contact_jid or not re.match(r"[^@ ]+@[^@ ]+", contact_jid):
             return
         contact_jid = jid.JID(contact_jid).bare
-        G.host.bridge.addContact(contact_jid,
+        G.host.bridge.addContact(unicode(contact_jid),
             self.profile,
             callback=lambda: G.host.addNote(
                 _(u"contact request"),
@@ -88,7 +88,7 @@
 
     def do_delete_contact(self):
         self.hide()
-        G.host.bridge.delContact(self.contact_item.jid.bare,
+        G.host.bridge.delContact(unicode(self.contact_item.jid.bare),
         self.contact_item.profile,
         callback=lambda: G.host.addNote(
             _(u"contact removed"),