changeset 1637:7751b5a51586

primivitus: fixed crash when self.target is a full jid
author Goffi <goffi@goffi.org>
date Fri, 20 Nov 2015 11:46:26 +0100
parents e00f450c25fc
children 9e17690fb187
files frontends/src/primitivus/chat.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/frontends/src/primitivus/chat.py	Fri Nov 20 01:57:18 2015 +0100
+++ b/frontends/src/primitivus/chat.py	Fri Nov 20 11:46:26 2015 +0100
@@ -147,7 +147,10 @@
         elif self.type == C.CHAT_ONE2ONE:
             # FIXME: self.target is a bare jid, we need to check that
             contact_list = self.host.contact_lists[self.profile]
-            full_jid = contact_list.getFullJid(self.target)
+            if not self.target.resource:
+                full_jid = contact_list.getFullJid(self.target)
+            else:
+                full_jid = self.target
             self.host.addMenus(menu, C.MENU_SINGLE, {'jid': full_jid})
         return menu