Changeset 9853

Show
Ignore:
Timestamp:
06/27/08 17:07:15 (5 months ago)
Author:
asterix
Message:

entity capabilities for groupchat contacts. fixes #4033

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/common/caps.py

    r9791 r9853  
    207207                gajim.capscache.preload(self, jid, node, hash_method, hash) 
    208208 
    209                 contact=gajim.contacts.get_contact_from_full_jid(self.name, jid) 
    210                 if contact in [None, []]: 
    211                         return  # TODO: a way to put contact not-in-roster into Contacts 
    212                 elif isinstance(contact, list): 
    213                         contact = contact[0] 
     209                contact = gajim.contacts.get_contact_from_full_jid(self.name, jid) 
     210                if contact is None: 
     211                        room_jid, nick = gajim.get_room_and_nick_from_fjid(jid) 
     212                        contact = gajim.contacts.get_gc_contact(self.name, room_jid, nick) 
     213                        if contact is None: 
     214                                return  # TODO: a way to put contact not-in-roster into Contacts 
    214215 
    215216                # overwriting old data 
     
    221222                contact = gajim.contacts.get_contact_from_full_jid(self.name, jid) 
    222223                if not contact: 
    223                         return 
     224                        room_jid, nick = gajim.get_room_and_nick_from_fjid(jid) 
     225                        contact = gajim.contacts.get_gc_contact(self.name, room_jid, nick) 
     226                        if contact is None: 
     227                                return 
    224228                if not contact.caps_node: 
    225229                        return # we didn't asked for that?