Changeset 83

Show
Ignore:
Timestamp:
07/16/07 20:21:09 (3 years ago)
Author:
roidelapluie
Message:

Fatser way to determine unqiue room ID (don't ask server ...) & add a
<continue /> tag to invitation

Location:
gajim/branches/chat2muc/src
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • gajim/branches/chat2muc/src/common/connection.py

    r73 r83  
    13881388                        _on_unregister_account_connect(self.connection) 
    13891389 
    1390         def send_invite(self, room, to, reason=''): 
     1390        def send_invite(self, room, to, reason='', continue_tag=False): 
    13911391                '''sends invitation''' 
    13921392                message=common.xmpp.Message(to = room) 
     
    13951395                if reason != '': 
    13961396                        c.setTagData('reason', reason) 
     1397                if continue_tag: 
     1398                        c.addChild(name = 'continue') 
    13971399                self.connection.send(message) 
    13981400 
  • gajim/branches/chat2muc/src/dialogs.py

    r82 r83  
    33213321                self.window.show_all() 
    33223322 
    3323                 # hide this 
     3323                # ...hide this 
    33243324                self.server_selection_visible = True 
    33253325                self.toggle_server_selection_visible() 
     
    33483348                if server == '': 
    33493349                        return 
    3350                 if self.servers_support.has_key(server): 
    3351                         self.unique_room_id_supported(server, self.servers_support[server]) 
    3352                         return 
    3353                 gajim.connections[self.account].check_unique_room_id_support(server, self) 
    3354  
    3355         def unique_room_id_supported(self, server, room_id): 
    3356                 if not self.servers_support.has_key(server): 
    3357                         self.servers_support[server] = room_id 
     3350                room_id = gajim.nicks[self.account] + str(randrange(9999999)) 
     3351#               if self.servers_support.has_key(server): 
     3352#                       self.unique_room_id_supported(server, self.servers_support[server]) 
     3353#                       return 
     3354#               gajim.connections[self.account].check_unique_room_id_support(server, self) 
     3355 
     3356#       def unique_room_id_supported(self, server, room_id): 
     3357#               if not self.servers_support.has_key(server): 
     3358#                       self.servers_support[server] = room_id 
    33583359                guest_list = [] 
    33593360                guests = self.guests_treeview.get_selection().get_selected_rows() 
     
    33663367                gajim.automatic_rooms[self.account][room_jid] = {} 
    33673368                gajim.automatic_rooms[self.account][room_jid]['invities'] = guest_list  
     3369                gajim.automatic_rooms[self.account][room_jid]['continue_tag'] = True 
    33683370                gajim.interface.roster.join_gc_room(self.account, room_jid, 
    33693371                        gajim.nicks[self.account], None) 
  • gajim/branches/chat2muc/src/gajim.py

    r73 r83  
    11851185                        gajim.connections[account].send_gc_config(room_jid, array[1]) 
    11861186                        # invite contacts 
     1187                        # check if it is necessary to add <continue /> 
     1188                        continue_tag = False 
     1189                        if gajim.automatic_rooms[account][room_jid].has_key('continue_tag'): 
     1190                                continue_tag = True 
    11871191                        if gajim.automatic_rooms[account][room_jid].has_key('invities'): 
    11881192                                for jid in gajim.automatic_rooms[account][room_jid]['invities']: 
    1189                                         gajim.connections[account].send_invite(room_jid, jid) 
     1193                                        gajim.connections[account].send_invite(room_jid, jid, 
     1194                                                continue_tag=continue_tag) 
    11901195                        del gajim.automatic_rooms[account][room_jid] 
    11911196                elif not self.instances[account]['gc_config'].has_key(room_jid):