Changeset 8535 for trunk/src/common/connection.py
- Timestamp:
- 08/22/07 01:13:03 (17 months ago)
- Files:
-
- 1 modified
-
trunk/src/common/connection.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/common/connection.py
r8513 r8535 1202 1202 self.connection.send(p) 1203 1203 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 1204 1219 def join_gc(self, nick, room_jid, password): 1205 1220 # FIXME: This room JID needs to be normalized; see #1364 … … 1388 1403 _on_unregister_account_connect(self.connection) 1389 1404 1390 def send_invite(self, room, to, reason='' ):1405 def send_invite(self, room, to, reason='', continue_tag=False): 1391 1406 '''sends invitation''' 1392 1407 message=common.xmpp.Message(to = room) 1393 1408 c = message.addChild(name = 'x', namespace = common.xmpp.NS_MUC_USER) 1394 1409 c = c.addChild(name = 'invite', attrs={'to' : to}) 1410 if continue_tag: 1411 c.addChild(name = 'continue') 1395 1412 if reason != '': 1396 1413 c.setTagData('reason', reason)
