primivitus: fixed crash when self.target is a full jid

This commit is contained in:
Goffi 2015-11-20 11:46:26 +01:00
commit 435a3fcb90

View file

@ -147,7 +147,10 @@ class Chat(PrimitivusWidget, QuickChat):
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