Age | Commit message (Collapse) | Author |
|
Based on profiling, using around 35 stream handlers quarters the number
of basic message stanzas that can be processed in a second, in
comparison to only using the bare minimum of four handlers.
To help, we can drop handlers for stream features once the session
has started. So that we can re-enable these handlers when a stream
must restart, the 'stream_start' event has been added which fires
whenever a stream header is received.
The 'stream_start' event is a more generic replacement for the
existing start_stream_handler() method.
|
|
|
|
|
|
|
|
|
|
The exceptions are handled, so we don't need to clutter the output logs.
|
|
get_roster() now returns the Iq result stanza instead of True (stanzas
also evaluate to True).
|
|
As part of adding this feature:
- fixed bug in update_caps() not assigning verstrings
- fixed xep_0004 typo
- can now use None as a roster key which will map to boundjid.bare
- fixed using JID objects in disco node handlers
- fixed failing test related to get_roster
Several of these bugs I've fixed before, so I either didn't push them
earlier, or I clobbered something when merging. *shrug*
|
|
The __repr__ version now looks like a regular dictionary.
|
|
Fixes issue #136
|
|
|
|
NOTE: This requires already having the access token. It does NOT
perform any OAuth requests.
|
|
Adds session_bind event.
|
|
|
|
|
|
Fix a typo in several files.
|
|
This fixes several instances of "intial" for "initial".
|
|
|
|
Protip: Don't test using a custom disco handler that always returns the
same feature set :p
|
|
|
|
|
|
Some small fixes
|
|
|
|
Finally
|
|
XEP-0115 needs to use the raw XML character data.
|
|
XEP-0115 requires detecting duplicates, so we can't always silently
ignore them.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
New plugin configuration options:
use_cache - Enable caching disco info results. Defaults to True
wrap_results - Always return disco results in an Iq stanza. Defaults
to False
Node handler changes:
Handlers now take four arguments: jid, node, ifrom, data
Most older style handlers will still work, depending on if they
raise a TypeError for incorrect number of arguments. Handlers that
used *args may not work.
New get_info options:
cached - Passing cached=True to get_info() will attempt to load
results from the cache. If nothing is found, a query
will be sent as normal. If set to False, the cache
will be skipped, even if it contains results.
New method:
supports() - Given a JID/node pair and a feature, return True
if the feature is supported, False if not, and
None if there was a timeout. By default, the search
will use the cache.
|
|
|
|
|
|
|
|
This should resolve issue #102
|
|
|
|
Fixes issue #127
|
|
Updated the XML-RPC value conversion to correctly apply namespaces, and
fixed an error uncovered by the tests in the XML -> Python conversion of
dateTime values.
|
|
|
|
|
|
|
|
This allows applications to filter out sensitive information, such
as passwords, so that it won't appear in the logs.
It does mean that the debug logs will not show the actual received
data, and there will be no indication of tampering, unless the
filter author explicitly logs and notes that a change was made.
|
|
|
|
forms.
|
|
The item fields were not setting their type based on the reported
field's type attribute, so values were not being encoded properly.
Fixes issue #121
|
|
|
|
A filter accepts and returns a stanza, but potentially modified.
To prevent sending/receiving a stanza, a filter may return None.
Incoming:
self.add_filter('in', in_filter)
Outgoing:
self.add_filter('out', out_filter)
Filters are applied in the order thay are added. However, you may
add an order parameter, which is the place in the list to insert the
filter:
self.add_filter('in', in_filter, order=0)
|