show invitation from anonymous room in roster from a groupchat rather than from a normal Contact. fixes #3448

This commit is contained in:
Yann Leboulanger 2008-03-21 12:30:23 +00:00
parent ccb23a9e0c
commit 1008d162f4
2 changed files with 7 additions and 4 deletions

View File

@ -1666,8 +1666,12 @@ class Interface:
self.roster.show_title()
if no_queue: # We didn't have a queue: we change icons
if not gajim.contacts.get_contact_with_highest_priority(account, jid):
# add contact to roster ("Not In The Roster") if he is not
self.roster.add_to_not_in_the_roster(account, jid)
if type_ == 'gc-invitation':
self.roster.add_groupchat_to_roster(account, jid,
status='offline')
else:
# add contact to roster ("Not In The Roster") if he is not
self.roster.add_to_not_in_the_roster(account, jid)
self.roster.draw_contact(jid, account)
# Show contact in roster (if he is invisible for example) and select line

View File

@ -445,8 +445,7 @@ class RosterWindow:
self.add_contact_to_roster(contact.jid, account)
return contact
def add_groupchat_to_roster(self, account, jid, nick = '', resource = '',
status = ''):
def add_groupchat_to_roster(self, account, jid, resource = '', status = ''):
''' add groupchat to roster '''
contact = gajim.contacts.get_contact_with_highest_priority(account, jid)
if contact == None: