Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Accepting download requests can be done using:
self['xep_0066'].register_url_handler(handler=self.oob_download)
# Add jid=... to specify a handler for a particular JID for a
# componenent.
def oob_download(self, iq):
if iq['from'] not in self.custom_oob_whitelist:
raise XMPPError('not-authorized')
try:
data = urllib2.urlopen(iq['oob_transfer']['url'])
file = open('oob_download', 'w+')
file.write(data.read())
file.close()
data.close()
except:
raise XMPPError('item-not-found')
|
|
If wait=True, then the disconnect call will block until
the send queue has emptied.
WARNING: Using wait=True when more stanzas are being added to the
queue than can be processed such that the queue is never empty
will cause the disconnect call to block indefinitely without actually
disconnecting.
|
|
|
|
|
|
XEP-0092 now uses sleekxmpp.__version__ as a default version number.
|
|
|
|
|
|
Namely, minutes and seconds were reversed.
|
|
|
|
This should make things much easier for any stanza that uses timestamps.
|
|
|
|
|
|
Broke SASL stanzas into separate files.
Fixed typo in feature_bind.
|
|
|
|
I keep forgetting to update the copyright on new code.
|
|
Added guards to prevent renegotiating STARTTLS or SASL in cases where
servers don't behave properly.
|
|
Moved SASL registration completely to the feature plugin, instead of
keeping a portion of it in ClientXMPP.
|
|
Fixed missing references that weren't caught due to leftover pyc
file allowing tests to keep working when they shouldn't have.
|
|
|
|
The error bubbles through the event processing loop, breaking it and
hanging the application.
Instead, there is now a .exception(e) method on XMLStream which may
be overridden or reassigned that will receive all unhandled exceptions
(read: not XMPPError) from event and stream handlers.
|
|
|
|
|
|
ANONYMOUS was being treated as PLAIN, mechanism was being chosen
purely from supported mechanisms, not those provided by the server.
Broke nested handler methods into top-level methods.
|
|
|
|
|
|
If a stanza handler raised an exception, the exception was processed
and replied by the modified stanza, not a stanza with the original
content.
A copy is now made before handler processing, and if an exception occurs
it is the copy that processes the exception using the original content.
|
|
|
|
Caused by same issue of a JID being in the roster, but with an
incomplete entry.
|
|
|
|
If the roster contained a JID, but not any resource presence data, then
an error would occur when accessing self.roster[jid]['presence'].
|
|
|
|
|
|
For now, session_end is the same as disconnected, but once support is
added later for stream management, the two events will become distinct.
Plugins should add handlers for session_end for cleaning any session
state.
|
|
|
|
|
|
|
|
|
|
The stanza will be sent first once the send queue is reactivated
after session start.
Stanzas sent by skipping the queue will not be cached.
|
|
Conflicts:
sleekxmpp/clientxmpp.py
|
|
Backoff was only being done for the initial connection attempt
before. Now any reconnection will start with a minimum 1 sec
delay which will approximately double between attempts.
|
|
The syntax and attribute errors raised during a disconnect/reconnect
attempt are now caught and produce nicer log messages.
|
|
Use the parameter now=True to skip the queue when
sending Iq stanzas, or using xmpp.send().
|
|
|
|
Delay will approximately double between attempts (random variation).
See issue #67.
|
|
|
|
|
|
JIDs with Unicode values were being encoded by the JID class
instead of leaving them as just Unicode strings.
It may still be a good idea to use
from __future__ import unicode_literals
pretty much everywhere though.
Fixes issue #88.
|