From c86f7fcef451bd3e80d730a96335041e18567f99 Mon Sep 17 00:00:00 2001 From: Yann Leboulanger Date: Wed, 15 Nov 2006 15:52:56 +0000 Subject: [PATCH] take incoming nickname from first message into account. see #884 --- src/roster_window.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/roster_window.py b/src/roster_window.py index 55f18aea6..578a530f2 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -393,7 +393,7 @@ class RosterWindow: model.set_value(iter, 1 , gtkgui_helpers.escape_for_pango_markup( '%s (%s/%s)' % (group, repr(nbr_on), repr(nbr_total)))) - def add_to_not_in_the_roster(self, account, jid): + def add_to_not_in_the_roster(self, account, jid, nick = ''): ''' add jid to group "not in the roster", he MUST not be in roster yet, return contact ''' keyID = '' @@ -402,7 +402,7 @@ class RosterWindow: if jid in attached_keys: keyID = attached_keys[attached_keys.index(jid) + 1] contact = gajim.contacts.create_contact(jid = jid, - name = '', groups = [_('Not in Roster')], + name = nick, groups = [_('Not in Roster')], show = 'not in roster', status = '', sub = 'none', keyID = keyID) gajim.contacts.add_contact(account, contact) @@ -2936,7 +2936,7 @@ _('If "%s" accepts this request you will know his or her status.') % jid) contact = highest_contact if not contact: # contact is not in roster - contact = self.add_to_not_in_the_roster(account, jid) + contact = self.add_to_not_in_the_roster(account, jid, user_nick) path = self.get_path(jid, account) # Try to get line of contact in roster