don't request vcard to full JID when we join a room

This commit is contained in:
Yann Leboulanger 2010-04-30 14:18:06 +02:00
parent 11ddb8a6fb
commit 3fd9a0a282

View file

@ -1489,8 +1489,10 @@ class GroupchatControl(ChatControlBase):
'role', role_name, None))
self.draw_all_roles()
iter_ = model.append(role_iter, (None, nick, 'contact', name, None))
if not nick in gajim.contacts.get_nick_list(self.account, self.room_jid):
gc_contact = gajim.contacts.create_gc_contact(room_jid=self.room_jid, account=self.account,
if not nick in gajim.contacts.get_nick_list(self.account,
self.room_jid):
gc_contact = gajim.contacts.create_gc_contact(
room_jid=self.room_jid, account=self.account,
name=nick, show=show, status=status, role=role,
affiliation=affiliation, jid=j, resource=resource)
gajim.contacts.add_gc_contact(self.account, gc_contact)
@ -1503,13 +1505,11 @@ class GroupchatControl(ChatControlBase):
fake_jid = self.room_jid + '/' + nick
pixbuf = gtkgui_helpers.get_avatar_pixbuf_from_cache(fake_jid)
if pixbuf == 'ask':
if j:
fjid = j
if resource:
fjid += '/' + resource
gajim.connections[self.account].request_vcard(fjid, fake_jid)
if j and not self.is_anonymous:
gajim.connections[self.account].request_vcard(j, fake_jid)
else:
gajim.connections[self.account].request_vcard(fake_jid, fake_jid)
gajim.connections[self.account].request_vcard(fake_jid,
fake_jid)
if nick == self.nick: # we became online
self.got_connected()
self.list_treeview.expand_row((model.get_path(role_iter)), False)