Commit ce73e82f authored by Yann Leboulanger's avatar Yann Leboulanger

Fix traceback when right click on email in history viewer. Fixes #5131

parent dd3d8288
...@@ -842,12 +842,13 @@ class ConversationTextview: ...@@ -842,12 +842,13 @@ class ConversationTextview:
self.handlers[id] = childs[6] self.handlers[id] = childs[6]
allow_add = False allow_add = False
c = gajim.contacts.get_first_contact_from_jid(self.account, text) if self.account:
if c and not gajim.contacts.is_pm_from_contact(self.account, c): c = gajim.contacts.get_first_contact_from_jid(self.account, text)
if _('Not in Roster') in c.groups: if c and not gajim.contacts.is_pm_from_contact(self.account, c):
if _('Not in Roster') in c.groups:
allow_add = True
else: # he or she's not at all in the account contacts
allow_add = True allow_add = True
else: # he or she's not at all in the account contacts
allow_add = True
if allow_add: if allow_add:
id = childs[7].connect('activate', self.on_add_to_roster_activate, id = childs[7].connect('activate', self.on_add_to_roster_activate,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment