From 1008d162f42ad9c5bfce025a9c60fe54d3162dc5 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Fri, 21 Mar 2008 12:30:23 +0000 Subject: [PATCH] show invitation from anonymous room in roster from a groupchat rather than from a normal Contact. fixes #3448 --- src/gajim.py | 8 ++++++-- src/roster_window.py | 3 +-- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/gajim.py b/src/gajim.py index b121afe04..e07c14caf 100755 --- a/src/gajim.py +++ b/src/gajim.py @@ -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 diff --git a/src/roster_window.py b/src/roster_window.py index 54cfdfa2d..1dec6e6f7 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -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: