Changeset 8632 for branches/gajim_0.11.1/src/common
- Timestamp:
- 08/30/07 22:35:52 (15 months ago)
- Location:
- branches/gajim_0.11.1/src/common
- Files:
-
- 3 modified
-
commands.py (modified) (1 diff)
-
xmpp/dispatcher_nb.py (modified) (2 diffs)
-
xmpp/transports_nb.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/gajim_0.11.1/src/common/commands.py
r7940 r8632 136 136 # if going offline, we need to push response so it won't go into 137 137 # queue and disappear 138 self.connection.connection.send(response, presencetype == 'offline')138 self.connection.connection.send(response, now = presencetype == 'offline') 139 139 140 140 # send new status -
branches/gajim_0.11.1/src/common/xmpp/dispatcher_nb.py
r7462 r8632 400 400 self.SendAndWaitForResponse(stanza, 0, func, args) 401 401 402 def send(self, stanza, is_message = False ):402 def send(self, stanza, is_message = False, now = False): 403 403 ''' Serialise stanza and put it on the wire. Assign an unique ID to it before send. 404 404 Returns assigned ID.''' 405 405 if type(stanza) in [type(''), type(u'')]: 406 return self._owner.Connection.send(stanza )406 return self._owner.Connection.send(stanza, now = now) 407 407 if not isinstance(stanza, Protocol): 408 408 _ID=None … … 428 428 stanza.setParent(self._metastream) 429 429 if is_message: 430 self._owner.Connection.send(stanza, True )430 self._owner.Connection.send(stanza, True, now = now) 431 431 else: 432 self._owner.Connection.send(stanza )432 self._owner.Connection.send(stanza, now = now) 433 433 return _ID 434 434 -
branches/gajim_0.11.1/src/common/xmpp/transports_nb.py
r7535 r8632 326 326 return True 327 327 328 def send(self, raw_data ):328 def send(self, raw_data, now = False): 329 329 '''Append raw_data to the queue of messages to be send. 330 330 If supplied data is unicode string, encode it to utf-8. … … 337 337 elif not isinstance(r, str): 338 338 r = ustr(r).encode('utf-8') 339 self.sendqueue.append(r) 339 if now: 340 self.sendqueue.insert(0, r) 341 self._do_send() 342 else: 343 self.sendqueue.append(r) 340 344 self._plug_idle() 341 345
