Mercurial > libervia-backend
comparison frontends/src/primitivus/chat.py @ 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 | 95ea323e7d04 |
children | 3a6cd1c14974 |
comparison
equal
deleted
inserted
replaced
1636:e00f450c25fc | 1637:7751b5a51586 |
---|---|
145 game = _("Game") | 145 game = _("Game") |
146 menu.addMenu(game, "Tarot", self.onTarotRequest) | 146 menu.addMenu(game, "Tarot", self.onTarotRequest) |
147 elif self.type == C.CHAT_ONE2ONE: | 147 elif self.type == C.CHAT_ONE2ONE: |
148 # FIXME: self.target is a bare jid, we need to check that | 148 # FIXME: self.target is a bare jid, we need to check that |
149 contact_list = self.host.contact_lists[self.profile] | 149 contact_list = self.host.contact_lists[self.profile] |
150 full_jid = contact_list.getFullJid(self.target) | 150 if not self.target.resource: |
151 full_jid = contact_list.getFullJid(self.target) | |
152 else: | |
153 full_jid = self.target | |
151 self.host.addMenus(menu, C.MENU_SINGLE, {'jid': full_jid}) | 154 self.host.addMenus(menu, C.MENU_SINGLE, {'jid': full_jid}) |
152 return menu | 155 return menu |
153 | 156 |
154 def presenceListener(self, entity, show, priority, statuses, profile): | 157 def presenceListener(self, entity, show, priority, statuses, profile): |
155 """Update entity's presence status | 158 """Update entity's presence status |