Show
Ignore:
Timestamp:
08/22/07 01:13:03 (17 months ago)
Author:
asterix
Message:

[roidelapluie, elghinn, msieurhappy, xbright and me] chat to muc convertion. see #2095 and #1408. TODO: DND

Files:
1 modified

Legend:

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

    r8513 r8535  
    12021202                self.connection.send(p) 
    12031203 
     1204        def check_unique_room_id_support(self, server, instance): 
     1205                if not self.connection: 
     1206                        return 
     1207                iq = common.xmpp.Iq(typ = 'get', to = server) 
     1208                iq.setAttr('id', 'unique1') 
     1209                iq.addChild('unique', namespace=common.xmpp.NS_MUC_UNIQUE) 
     1210                def _on_response(resp): 
     1211                        if not common.xmpp.isResultNode(resp): 
     1212                                self.dispatch('UNIQUE_ROOM_ID_UNSUPPORTED', (server, instance)) 
     1213                                return 
     1214                        print resp.getTag('unique').getData() 
     1215                        self.dispatch('UNIQUE_ROOM_ID_SUPPORTED', (server, instance, 
     1216                                resp.getTag('unique').getData())) 
     1217                self.connection.SendAndCallForResponse(iq, _on_response) 
     1218 
    12041219        def join_gc(self, nick, room_jid, password): 
    12051220                # FIXME: This room JID needs to be normalized; see #1364 
     
    13881403                        _on_unregister_account_connect(self.connection) 
    13891404 
    1390         def send_invite(self, room, to, reason=''): 
     1405        def send_invite(self, room, to, reason='', continue_tag=False): 
    13911406                '''sends invitation''' 
    13921407                message=common.xmpp.Message(to = room) 
    13931408                c = message.addChild(name = 'x', namespace = common.xmpp.NS_MUC_USER) 
    13941409                c = c.addChild(name = 'invite', attrs={'to' : to}) 
     1410                if continue_tag: 
     1411                        c.addChild(name = 'continue') 
    13951412                if reason != '': 
    13961413                        c.setTagData('reason', reason)