get contact from the self.contacts so that even if it's pm we get a Contact instance

This commit is contained in:
Yann Leboulanger 2006-01-08 00:27:38 +00:00
parent 13dad4a17e
commit f8f200ebe7
1 changed files with 2 additions and 2 deletions

View File

@ -463,7 +463,7 @@ class Chat:
if self.widget_name == 'tabbed_chat_window':
jid = self.get_active_jid()
c = gajim.contacts.get_first_contact_from_jid(self.account, jid)
c = self.contacts[jid]
if _('not in the roster') in c.groups: # for add_to_roster_menuitem
childs[5].show()
childs[5].set_no_show_all(False)
@ -501,7 +501,7 @@ class Chat:
childs[3].set_active(isactive)
childs[3].set_property('sensitive', issensitive)
# If we don't have resource, we can't do file transfert
c = gajim.contacts.get_first_contact_from_jid(self.account, jid)
c = self.contacts[jid]
if not c.resource:
childs[2].set_sensitive(False)
else: