Compare commits

..

212 Commits

Author SHA1 Message Date
James Shiffer
610923138f Bump version to 1.7.2 2025-02-10 15:03:37 -08:00
James Shiffer
c4cbb59a44 Fix for Python 3.10+ 2025-02-10 14:55:30 -08:00
mathieui
24375f3c47 Release slix 1.7.1 2021-04-30 18:52:13 +02:00
mathieui
8b90cdd73f xmlstream: fix slow tasks scheduling
- wrong attribute used
- some mistakes in the slow tasks function
2021-04-30 18:51:07 +02:00
mathieui
ee671dfb29 Merge branch 'next-version-1.7.0' into 'master'
Increment version to 1.7.0

See merge request poezio/slixmpp!107
2021-01-29 21:57:26 +01:00
mathieui
d954283fb6 version: update to 1.7.0 2021-01-29 21:50:43 +01:00
mathieui
ed2c03fade DOAP: add an 1.7.0 entry
also remove some duplicate description tags
2021-01-29 21:50:22 +01:00
Link Mauve
a381267d21 Merge branch 'connect-basic-itests' into 'master'
tests: add basic reconnect/connect integration tests

See merge request poezio/slixmpp!106
2021-01-29 16:51:05 +01:00
mathieui
1e1576473b tests: add basic reconnect/connect integration tests 2021-01-29 16:48:30 +01:00
Link Mauve
dbcd0c6050 Merge branch 'reconnect-logic-doomed' into 'master'
fix reconnect logic

See merge request poezio/slixmpp!104
2021-01-29 16:11:29 +01:00
mathieui
f93af07882 XEP-0198: do not send acks when disconnected 2021-01-29 16:07:44 +01:00
mathieui
3f739e513b xmlstream: keep value of "end_session_on_disconnect"
That value should be set statically. Worst case is we fail to resume the
session.
2021-01-29 15:33:44 +01:00
mathieui
fc7d7b4eb7 XEP-0198: Enable SM even if we failed resuming the session
And trigger session_end only after we fail the resuming.
2021-01-29 15:33:44 +01:00
mathieui
3642e2c7f4 xmlstream: ensure slow futures are scheduled on this loop 2021-01-29 15:33:44 +01:00
mathieui
f15311bda8 xmlstream: Make the reconnect handler a coroutine 2021-01-29 15:33:44 +01:00
mathieui
b2dfb4c1f3 xmlstream: do not touch connection state on abort()
leave it to the connection_lost handler
2021-01-29 15:33:44 +01:00
mathieui
d227579d56 xmlstream: set disconnected future on event 2021-01-29 15:33:44 +01:00
mathieui
571774edb4 xmlstream: end the parser when the stream has ended 2021-01-29 15:33:44 +01:00
mathieui
456dff0b61 xmlstream: rename run_filters 2021-01-29 15:33:44 +01:00
mathieui
a0b6bfcefe xmlstream: change the connection logic
* use asyncio wait_for to wait for a disconnected event
* abort the connection if the timeout is not enough
2021-01-29 15:33:44 +01:00
mathieui
9fbd40578c xmlstream: purge send queue and pending tasks on session end
and keep track of slow tasks
2021-01-29 15:33:44 +01:00
mathieui
8700f8d162 xmlstream: do not cancel the send filter task
it does not make sense to cancel it, it does not do anything when the
sending queue is empty, and clients should not fill the send queue when
not connected anyway.
2021-01-28 17:54:40 +01:00
mathieui
efdcd396d8 xmlstream: fix race conditions on handlers 2021-01-28 17:54:40 +01:00
mathieui
0eed84d0b2 xmlstream: handle done tasks in wait_until
and handle other loops properly
2021-01-28 17:54:40 +01:00
mathieui
370abb1d98 Merge branch 'block-threaded-examples-docs' into 'master'
Remove the remaining block and threaded from examples

See merge request poezio/slixmpp!105
2021-01-27 00:20:31 +01:00
mathieui
51866f0d46 docs: update the tutorials a bit 2021-01-27 00:16:56 +01:00
mathieui
9390794401 examples: updates to reflect asyncio 2021-01-27 00:09:26 +01:00
mathieui
70b5081018 Merge branch 'xep-0382-spoiler-messages' into 'master'
XEP-0382: Spoiler Messages

See merge request poezio/slixmpp!100
2021-01-27 00:07:36 +01:00
mathieui
4cb679ae2a Merge branch 'fix-emoji-update' into 'master'
XEP-0444: Fix emoji detection

See merge request poezio/slixmpp!103
2021-01-24 11:33:57 +01:00
mathieui
ab280b44cc XEP-0444: Fix emoji detection
the emoji lib just released a major release after 5 years, which breaks
the API. This new code is compatible with both.
2021-01-24 11:31:17 +01:00
mathieui
0193667ace Merge branch 'ping-cancel-iqs-on-session-end' into 'master'
Cancel  0199 pings on session end

See merge request poezio/slixmpp!102
2021-01-24 11:30:51 +01:00
mathieui
9cb5131f1c XEP-0199: Fix handler default parameter, add typing
Clear futures when disabling the keepalive, and do it on every
disconnect instead of only at session end.
2021-01-24 11:20:43 +01:00
mathieui
0bf1b96859 Merge branch 'handle-connection-errors-in-starttls' into 'master'
Handle connection errors in start_tls (fix #3449)

Closes #3449

See merge request poezio/slixmpp!101
2021-01-24 10:30:45 +01:00
mathieui
c6a0da63ae XEP-0199: cancel ongoing handlers on session end
and keep track of them but be careful to not store too many

fix for #3442
2021-01-22 22:57:15 +01:00
mathieui
3f10dfe138 iq: only update the future if it is not done 2021-01-22 22:55:39 +01:00
mathieui
49577e6c84 Handle connection errors in start_tls (fix #3449) 2021-01-22 22:04:41 +01:00
mathieui
04dcc8628d XEP-0382: update DOAP file 2021-01-22 19:24:11 +01:00
mathieui
81ebf4e8ba XEP-0382: Spoiler Messages 2021-01-22 18:40:37 +01:00
mathieui
b784b68bcd Merge branch 'disconnect-event-after-cleanup' into 'master'
XMLStream: Only fire "disconnected" after removal of related objects

See merge request poezio/slixmpp!99
2021-01-19 21:12:52 +01:00
mathieui
f38c61a6b9 XMLStream: Only fire "disconnected" after removal of related objects
Otherwise we could end up reconnecting and getting some useful things
like the XML parser or other stuff removed afterwards.

Also, move 'session_end' before 'disconnected', it makes more sense that
way.
2021-01-17 18:30:57 +01:00
Link Mauve
2631b25e3e Merge branch 'ad-mucjoin-component-event' into 'master'
XEP-0045: Add a groupchat_join MUC event for components

See merge request poezio/slixmpp!98
2021-01-12 20:36:36 +01:00
mathieui
2b11d81b86 XEP-0045: Add a groupchat_join MUC event for components 2021-01-12 20:29:27 +01:00
Link Mauve
ca465032e7 Merge branch 'xep-0045-fixes-misc' into 'master'
Misc fixes for XEP-0045

See merge request poezio/slixmpp!97
2021-01-10 15:12:20 +01:00
mathieui
6369ee0e5f XEP-0045: Better component handling 2021-01-10 15:07:48 +01:00
mathieui
1e23167ce4 XEP-0045: Better "groupchat_presence" targeting
(do not make EVERY SINGLE presence go through the 0045 handler)
2021-01-10 15:07:48 +01:00
mathieui
cccc1253aa XEP-0045: add more elements (<actor/>) 2021-01-10 15:07:48 +01:00
mathieui
fb31e9c1fd Merge branch 'test-skip-dependency' into 'master'
CI: Skip test if the emoji dep is not here

See merge request poezio/slixmpp!96
2021-01-10 11:27:48 +01:00
mathieui
b4dd1e0132 CI: Skip test if the emoji dep is not here 2021-01-10 11:12:00 +01:00
Link Mauve
525855c17b Fix homepage in DOAP. Thanks mathieui! 2021-01-01 14:35:55 +01:00
mathieui
ce0d615786 Merge branch 'muc-mypy-fixes' into 'master'
XEP-0045: Fix issues found by mypy

See merge request poezio/slixmpp!95
2020-12-27 19:44:31 +01:00
Emmanuel Gil Peyrot
1e08c90018 XEP-0045: Add a set_subject() helper 2020-12-27 02:59:43 +01:00
Emmanuel Gil Peyrot
c05cafc963 XEP-0045: Add missing reason for affiliation and role changes
This is especially useful for ban/kick reasons.
2020-12-27 02:59:09 +01:00
Emmanuel Gil Peyrot
166b265de0 XEP-0045: Fix issues found by mypy 2020-12-27 01:14:17 +01:00
mathieui
d91eea3a3a Merge branch 'fix-moderation-stanzaid' into 'master'
XEP-0425: Use stanzaid in integration test

See merge request poezio/slixmpp!93
2020-12-14 19:04:50 +01:00
mathieui
569b9c5ee2 XEP-0425: Use stanzaid in integration test
It only worked due to a prosody quirk
2020-12-14 18:59:51 +01:00
Maxime Buquet
a3ca4c11c3 Merge branch 'retract-in-groupchats' into 'master'
XEP-0424: fire event even with groupchat messages

See merge request poezio/slixmpp!92
2020-12-13 23:39:12 +01:00
mathieui
489e419e38 XEP-0424: fire event even with groupchat messages 2020-12-13 22:48:17 +01:00
Link Mauve
0b2594aa2c Merge branch 'doap-predict-next-version' into 'master'
doap: add next release link

See merge request poezio/slixmpp!91
2020-12-12 16:59:36 +01:00
mathieui
1b3a00c894 doap: add next release link 2020-12-12 16:57:07 +01:00
Link Mauve
ef201b6ae9 Merge branch 'oopsdate-doap' into 'master'
doap: replace NEXT with 1.6.0

See merge request poezio/slixmpp!90
2020-12-12 16:55:03 +01:00
mathieui
69af0fc1dc doap: replace NEXT with 1.6.0 2020-12-12 16:52:42 +01:00
mathieui
7ecdc7fced Merge branch 'update-slix-version' into 'master'
Release: update version to 1.6.0

See merge request poezio/slixmpp!89
2020-12-12 16:44:34 +01:00
mathieui
39c624f958 Release: update version to 1.6.0 2020-12-12 16:43:29 +01:00
Link Mauve
4c9591d5c9 Merge branch 'create-extras-require' into 'master'
setup.py: Move emoji and aiohttp to extras_require

See merge request poezio/slixmpp!88
2020-12-12 16:33:15 +01:00
mathieui
31841ef3bf setup.py: Move emoji and aiohttp to extras_require 2020-12-12 16:30:34 +01:00
Link Mauve
6773dc4409 Merge branch 'fix-moderation' into 'master'
XEP-0425: small fix & integration test

See merge request poezio/slixmpp!86
2020-12-12 14:51:25 +01:00
Link Mauve
71888b24a6 Merge branch 'retraction-event' into 'master'
XEP-0424: Add an event for message retraction

See merge request poezio/slixmpp!87
2020-12-12 14:45:49 +01:00
mathieui
3b00c56bdc XEP-0424: Add an event for message retraction
+ update the integration test
2020-12-12 14:43:18 +01:00
mathieui
bf17c32705 XEP-0425: Add integration test 2020-12-12 14:34:43 +01:00
mathieui
bc58c5a045 XEP-0425: Fix plugin registration, and add element 2020-12-12 14:33:48 +01:00
Link Mauve
d6be776640 Merge branch 'move-plugin-index-away' into 'master'
docs: move the plugin index away from the main page

See merge request poezio/slixmpp!85
2020-12-10 21:15:17 +01:00
mathieui
878870255f docs: move the plugin index away from the main page
it’s too big
2020-12-10 20:45:26 +01:00
Link Mauve
1e2d15b8f5 Merge branch 'docs-event-sphinx-plugins' into 'master'
Docs: add more events, add plugins to the doc

See merge request poezio/slixmpp!84
2020-12-10 19:45:30 +01:00
mathieui
155fc58a22 docs: add sphinx_autodoc_typehints dep 2020-12-10 19:22:40 +01:00
mathieui
95d40a3ca3 docs: update docstrings for sphinx conformity
Remove most references to timeout/callback/ifrom/timeout_callbacks args
2020-12-10 19:22:40 +01:00
mathieui
010bf6dd70 docs: fix rest issues 2020-12-10 19:22:40 +01:00
mathieui
9d61655215 docs: Add plugins 2020-12-10 19:22:40 +01:00
mathieui
f768a980d8 docs: update event index 2020-12-10 19:22:38 +01:00
mathieui
d371828041 Merge branch 'rai' into 'master'
XEP-0437: Room Activity Indicators

See merge request poezio/slixmpp!83
2020-12-08 18:59:04 +01:00
mathieui
b63dc3bc8c XEP-047: Room Activity Indicators
Implement the XEP
2020-12-08 18:56:26 +01:00
Link Mauve
8258202681 Merge branch 'xep-0333-fixes' into 'master'
XEP-0333: Fix some issues

See merge request poezio/slixmpp!80
2020-12-07 21:25:18 +01:00
Link Mauve
c892fba778 Merge branch 'xep-0439-improved' into 'master'
XEP-0439: add events & tests

See merge request poezio/slixmpp!82
2020-12-07 21:21:43 +01:00
mathieui
758dfb930c XEP-0439: add integration tests 2020-12-07 20:59:04 +01:00
mathieui
91c3d64ca2 XEP-0439: Add events 2020-12-07 20:58:16 +01:00
mathieui
340b0f0f16 Merge branch 'no-emoji-required' into 'master'
CI: do not require the emoji package

See merge request poezio/slixmpp!81
2020-12-07 20:32:27 +01:00
mathieui
a1ef32a122 CI: do not require the emoji package 2020-12-06 21:58:10 +01:00
mathieui
ef6dab81b9 itests: Add a chat markers test 2020-12-06 21:45:53 +01:00
mathieui
b3e2a8eb91 XEP-0333: Add missing feature, and a send_marker method 2020-12-06 21:45:22 +01:00
mathieui
11ac5867ff XEP-0333: Rename plugin file from "hints" to "markers" 2020-12-06 21:29:11 +01:00
mathieui
a61f2248fd Merge branch 'update-readme' into 'master'
README: document integration tests

See merge request poezio/slixmpp!79
2020-12-06 21:01:16 +01:00
mathieui
7a4ea4c1ae README: document integration tests 2020-12-06 20:59:00 +01:00
Link Mauve
c0acb7e34f Merge branch 'more-tests' into 'master'
Add more integration tests

See merge request poezio/slixmpp!78
2020-12-06 19:24:08 +01:00
mathieui
c89a21463f XEP-0444: fix a mistake in plugin_end 2020-12-06 18:59:59 +01:00
mathieui
1836b2b887 itests: add another bunch of tests 2020-12-06 18:59:59 +01:00
mathieui
12e3c9988d itests: fix muc test name 2020-12-06 18:59:59 +01:00
mathieui
b8f368acf3 Integration tests: parallelize client connects 2020-12-06 18:41:21 +01:00
mathieui
bcd8cf085f Merge branch 'no-ordered-stuff' into 'master'
Remove usage of OrderedDict

See merge request poezio/slixmpp!77
2020-12-06 17:08:00 +01:00
Emmanuel Gil Peyrot
cd4c9f82fc Remove OrderedDict usage
We now support only Python 3.7+, this means we can rely on dict being
ordered by order of insertion, and thus no need to use OrderedDict from
collections.
2020-12-06 17:00:47 +01:00
mathieui
73cc2a4008 Merge branch 'first-integration-tests' into 'master'
First integration tests

See merge request poezio/slixmpp!75
2020-12-05 17:37:50 +01:00
Link Mauve
aa5d422f38 Merge branch 'doap' into 'master'
DOAP di doap

See merge request poezio/slixmpp!76
2020-12-05 01:20:45 +01:00
Emmanuel Gil Peyrot
684247b375 XEP-0352: Only enable the feature on ClientXMPP 2020-12-05 01:05:16 +01:00
Emmanuel Gil Peyrot
6db5bb65d3 XEP-0300: Fix tests 2020-12-05 01:00:52 +01:00
Emmanuel Gil Peyrot
cc96e4a6e7 Plugins: Update the list to match what’s available
Piugins for deprecated and obsolete XEPs aren’t loaded by default
anymore.
2020-12-05 01:00:27 +01:00
Emmanuel Gil Peyrot
bb3c61f6e0 DOAP: Add all of the releases 2020-12-04 23:58:13 +01:00
Emmanuel Gil Peyrot
2c764b7c7d DOAP: List the correct versions and support status 2020-12-04 23:58:09 +01:00
mathieui
77587a4843 CI: add integration tests to the gitlab pipeline 2020-12-04 23:08:00 +01:00
mathieui
2cb2fcefbf Add some very basic integration tests 2020-12-04 23:06:50 +01:00
mathieui
d3dc09ce94 CI: add a script to run integration tests
(same as run_tests.py, but use adifferent directory)
2020-12-04 23:04:21 +01:00
mathieui
e6d1badb81 CI: Add helper for integration tests 2020-12-04 23:01:54 +01:00
mathieui
3d1e539d2b XMLStream: Add a wait_until coroutine
It will set a disposable handler on an event and wait on it with a
specific timeout. Useful for integration tests without callback hell.
2020-12-04 22:59:34 +01:00
Link Mauve
05749c4969 Merge branch 'more-xeps' into 'master'
Add a batch of newer XEPs

See merge request poezio/slixmpp!69
2020-12-04 20:03:32 +01:00
mathieui
c2b09c5c83 Update doap.xml 2020-12-04 19:49:41 +01:00
mathieui
fdb0749cd1 XEP-0422,0424,0425,0439: Add basic stanza tests 2020-12-04 19:45:05 +01:00
mathieui
2c523d1a3b XEP-0439: Quick Response 2020-12-04 19:42:23 +01:00
mathieui
41dea80d94 XEP-0425: Message Moderation 2020-12-04 19:42:23 +01:00
mathieui
c4ca15a040 XEP-0424: Message Retraction 2020-12-04 19:14:32 +01:00
mathieui
54d556280a XEP-0428: Fallback Indication 2020-12-04 19:14:32 +01:00
mathieui
c63e9a32b9 XEP-0359: Unique and Stable Stanza IDs
(was partially supported in places before)
2020-12-04 19:14:30 +01:00
mathieui
58c3579f74 XEP-0422: Message Fastening 2020-12-04 19:13:55 +01:00
Link Mauve
e592a46c99 Merge branch 'add-363' into 'master'
XEP-0363: Add 0363 to the extension list

See merge request poezio/slixmpp!74
2020-12-04 19:12:34 +01:00
mathieui
fa6fe5e851 CI: install aiohttp as well 2020-12-04 19:10:46 +01:00
mathieui
6c52843d71 XEP-0363: Add 0363 to the extension list 2020-12-04 18:55:55 +01:00
Link Mauve
d660e447ee Merge branch 'fix-reactions' into 'master'
XEP-0444: Fix session_bind()

See merge request poezio/slixmpp!73
2020-12-04 18:36:25 +01:00
mathieui
70cf35e9bf XEP-0444: Fix session_bind()
wrong method called: remove_feature instead of del_feature
2020-12-04 18:34:27 +01:00
mathieui
5c5780503a Merge branch 'xep-0353' into 'master'
XEP-0353: Jingle Message Initiation

See merge request poezio/slixmpp!72
2020-12-04 13:14:24 +01:00
Emmanuel Gil Peyrot
203628d707 XEP-0353: Jingle Message Initiation 2020-12-04 12:38:59 +01:00
Link Mauve
922ad8d9ea Merge branch 'muc-more' into 'master'
MUC: Fix invite/decline issue and add basic stanza tests

See merge request poezio/slixmpp!71
2020-12-04 00:30:13 +01:00
mathieui
8eb756d55c XEP-0045: Add basic stanza tests 2020-12-04 00:27:26 +01:00
mathieui
4da1c8573e XEP-0045: Register the missing invite/decline element 2020-12-04 00:22:22 +01:00
mathieui
380f0e4e38 Tests: Remove tabnanny
it is not actively useful and takes 70% of the time of the tests
2020-12-04 00:20:51 +01:00
mathieui
56f44dc47d Merge branch 'muc-improvements' into 'master'
MUC improvements

See merge request poezio/slixmpp!70
2020-12-03 23:50:14 +01:00
mathieui
fa7e33110f XEP-0045: Misc small fixes. 2020-12-03 23:28:27 +01:00
mathieui
7033bc0061 XEP-0045: Better invitation handling 2020-12-03 23:28:27 +01:00
mathieui
98b9a6f9e3 XEP-0045: Remove "self" returns from stanza methods 2020-12-03 23:28:27 +01:00
mathieui
de548fbcce XEP-0045: Add status_codes interface to the MUC element 2020-12-03 23:28:27 +01:00
mathieui
af46efc12a Merge branch 'doap' into 'master'
DOAP: Add the list of XEPs we support

See merge request poezio/slixmpp!68
2020-12-02 19:30:08 +01:00
Emmanuel Gil Peyrot
88132def60 DOAP: Add the list of XEPs we support
This comes from slixmpp/plugins/__init__.py
2020-12-02 19:27:58 +01:00
Link Mauve
26db6175f2 Merge branch 'doap' into 'master'
doap.xml

See merge request poezio/slixmpp!54
2020-12-02 19:22:53 +01:00
mathieui
4d5586f4a1 Merge branch 'mix-implementation' into 'master'
First try at a MIX implementation

See merge request poezio/slixmpp!63
2020-12-02 19:19:14 +01:00
mathieui
4eb2bb7da8 ElementBase: serialize JID objects as strings automatically
This is a shortcut to avoid defining custom methods each time a
substanza containing a JID exists in a plugin.

Same thing with attributes, there is no place where we do not want this.
2020-12-02 19:17:33 +01:00
mathieui
15bf6bc827 XEP-0405: add basic stanza tests 2020-12-02 19:17:33 +01:00
mathieui
3d1615ea54 XEP-0369: add basic stanza tests 2020-12-02 19:17:33 +01:00
mathieui
350f85a8d1 XEP-0403: MIX-Presence 2020-12-02 19:17:33 +01:00
mathieui
b62ea49de3 XEP-0404: MIX-Anon: JID hidden channels
(not found)
2020-12-02 19:17:33 +01:00
mathieui
bdc12c00c6 XEP-0405: MIX-PAM 2020-12-02 19:17:33 +01:00
mathieui
51cc459bd0 XEP-0369: MIX-Core 2020-12-02 19:17:33 +01:00
Link Mauve
54b9721f3a Merge branch 'xep-0047-fix-sequence-number' into 'master'
XEP-0047: Fix the max sequence number

See merge request poezio/slixmpp!67
2020-12-02 17:28:03 +01:00
Link Mauve
c20b72376e Merge branch 'muc-update' into 'master'
XEP-0045 examples: remove wait arg to join_muc calls

See merge request poezio/slixmpp!66
2020-12-02 17:27:47 +01:00
mathieui
b27510f05b XEP-0047: Fix the max sequence number
The max seq allowed according to the XEP is 65535, therefore we must
modulo using 65536 to allow that value.
2020-12-01 20:13:34 +01:00
mathieui
45a14871ee Examples: remove wait arg to join_muc calls
it hasn’t worked in years, and I removed it recently
2020-12-01 19:51:33 +01:00
mathieui
6ff5162fb4 Merge branch 'adhoc-execute-next' into 'master'
Allow execute to be used with the meaning of 'next'.

Closes #3432

See merge request poezio/slixmpp!13
2020-11-27 20:21:12 +01:00
mathieui
c3a6352a6b Merge branch 'fix-xep_0115-disco-component' into 'master'
Fix 'from' attribute missing for ComponentXMPP Disco IQ

Closes #3455

See merge request poezio/slixmpp!60
2020-11-27 20:06:53 +01:00
Link Mauve
086dc894d1 Merge branch 'remove-protoxep-occupantid' into 'master'
Remove protoxep_occupantid

See merge request poezio/slixmpp!65
2020-11-27 20:03:41 +01:00
mathieui
a245ba54bd Remove protoxep_occupantid
And fix some minor details in 0421 plugin.
2020-11-27 20:02:03 +01:00
Link Mauve
c86a6ad299 Merge branch 'xep-0444-and-not-protoxep' into 'master'
Promote protoxep_reactions to XEP-0444

See merge request poezio/slixmpp!64
2020-11-27 19:54:13 +01:00
mathieui
7e4b664742 Install emoji in docker 2020-11-27 19:46:42 +01:00
mathieui
ddc3974d1b Update protoxep_reactions to XEP-0444 2020-11-27 19:44:13 +01:00
Link Mauve
9b5ab741c8 Merge branch 'xep-45-misc-fixes' into 'master'
Misc fixes for xep-0045

See merge request poezio/slixmpp!62
2020-11-26 20:48:44 +01:00
mathieui
a9a7bdc6c3 XEP-0045: update methods for asyncio & stanza, typing
- This rewrites most of the stuff in the plugin by using the newly added
  elements instead of raw ElementTree stuff with hardcoded namespaces.
- Adds methods for affiliation/roles
- Adds some type hints
- Fix many cases where the call would simply not work since slixmpp
  exists (and break the API but it was already broken ¯\_(ツ)_/¯)
2020-11-26 20:47:21 +01:00
mathieui
fe68d19f91 XEP-0045: register the new elements & reformat init 2020-11-22 18:11:18 +01:00
mathieui
fe46643f2f XEP-0045: add more stanza elements 2020-11-22 18:11:18 +01:00
Maxime Buquet
985505297c Merge branch 'master' into 'master'
Cancel run_filters task upon disconnect

See merge request poezio/slixmpp!57
2020-10-01 17:15:06 +02:00
Maxime Buquet
0b38eeaa4a Merge branch 'xep-0363-callback-fix' into 'master'
XEP-0363 fix: call callback when receiving the upload slot.

See merge request poezio/slixmpp!58
2020-10-01 13:52:28 +02:00
Maxime Buquet
4dbabfa211 Merge branch 'stanzabase-docstring' into 'master'
StanzaBase.send: remove inexisting param in docstring -- thanks elghinn

See merge request poezio/slixmpp!61
2020-10-01 13:08:44 +02:00
Maxime “pep” Buquet
57c8196d9c StanzaBase.send: remove inexisting param in docstring -- thanks elghinn
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-10-01 13:06:37 +02:00
aearil
f90713cb9e Fix 'from' attribute missing for ComponentXMPP Disco IQ
Fixes #3455

This reuses the 'to' attribute of the received presence as a 'from' for
the Disco IQ. I don't know if this is the best way to do it, but in
testing with a simple component it fixed the error.

Also I'm not sure whether pres['to'] would also be valid when
is_component is False.
2020-08-05 20:35:30 -04:00
Maxime Buquet
9b9ace97f4 Merge branch 'muc-package' into 'master'
XEP-0045: Move into a package module. Add MUCMessage stanza plugin

See merge request poezio/slixmpp!56
2020-07-08 11:03:23 +02:00
Maxime “pep” Buquet
d497f94e6f Revert "Merge branch 'muc-stanza-format' into 'master'"
This reverts commit cde9ac123d, reversing
changes made to bb61f0f39d.
2020-07-08 10:53:03 +02:00
Maxime Buquet
cde9ac123d Merge branch 'muc-stanza-format' into 'master'
Muc stanza format

See merge request poezio/slixmpp!59
2020-07-08 10:23:05 +02:00
Maxime “pep” Buquet
c8d1eaa2dc xep_0045: also return default value when attr doesn't exist
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-07-08 10:21:16 +02:00
Maxime “pep” Buquet
200e1a6128 xep_0045: Make format string actually format strings
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-07-08 10:20:58 +02:00
cnngimenez
9c7f3d59d8 XEP-363 fix: call callback when receiving the upload slot. 2020-06-28 21:01:40 -03:00
ehendrix23
145bb7a36e Cancel run_filters task upon disconnect 2020-06-12 19:03:58 +02:00
Maxime “pep” Buquet
67fb5fe4c3 XEP-0045: register_stanza_plgin(Message, MUCMessage)
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-05-29 23:35:31 +02:00
Maxime “pep” Buquet
605a58a864 XEP-0045: Split __init__
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-05-29 23:35:31 +02:00
Maxime “pep” Buquet
a3d343b253 XEP-0045: Add MUCMessage
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-05-29 23:35:31 +02:00
Maxime “pep” Buquet
d58f59980f XEP-0045: Remove unused MUCPresence attributes
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-05-29 23:35:31 +02:00
Maxime “pep” Buquet
9e8ac6b769 XEP-0045: Add some types in stanza
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-05-29 23:35:31 +02:00
Maxime “pep” Buquet
3b3eed544e XEP-0045: Add stanza.NS* consts
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-05-29 17:27:51 +02:00
Maxime “pep” Buquet
03ee9bc4cc XEP-0045: Split stanza into sub-module
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-05-29 17:25:18 +02:00
Maxime “pep” Buquet
4fad5c62ce XEP-0045: Remove useless Python2-ness
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-05-29 14:15:28 +02:00
Maxime “pep” Buquet
5ccae3ce2a XEP-0045: Change to a package module
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-05-29 14:15:04 +02:00
Maxime “pep” Buquet
a104e3722e XEP-0045: Move into a package module. Add MUCMessage stanza plugin
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-05-29 01:33:32 +02:00
mathieui
bb61f0f39d Merge branch 'xep-0421' into 'master'
New XEP: 0421 Occupant-id

See merge request poezio/slixmpp!55
2020-05-28 00:35:48 +02:00
Maxime “pep” Buquet
a29ce4b547 XEP-0421: Add shorthand to namespace
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-05-27 23:45:41 +02:00
Maxime “pep” Buquet
07b1a4c1cd XEP-0421: add has_feature helper
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-05-27 22:39:52 +02:00
Maxime “pep” Buquet
cec34686fc New XEP: 0421 Occupant-id
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-05-27 22:39:52 +02:00
Maxime “pep” Buquet
03148ed92e WIP: doap.xml
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-05-24 22:59:05 +02:00
Maxime Buquet
6f4e9b485f Merge branch 'plugin-377' into 'master'
Add a plugin for XEP-0377: spam reporting

See merge request poezio/slixmpp!53
2020-05-24 15:05:24 +02:00
mathieui
28123083f7 Add stanza tests for 0377 2020-05-24 15:00:20 +02:00
mathieui
ef961392be Enforce <spam/> and <abuse/> quantity constraints 2020-05-24 13:46:47 +02:00
mathieui
2e31de3f45 Add a plugin for XEP-0377: spam reporting 2020-05-24 13:33:51 +02:00
mathieui
8a52730f11 Merge branch 'tutorial' into 'master'
Tutorial - english and polish version.

See merge request poezio/slixmpp!33
2020-05-24 13:05:56 +02:00
mathieui
04df50feac Merge branch 'release-slix-1.5.2' into 'master'
Update version to 1.5.2

See merge request poezio/slixmpp!52
2020-05-23 23:46:01 +02:00
mathieui
c7bd224182 Update version to 1.5.2 2020-05-23 23:43:27 +02:00
mathieui
bac1e9b44a Merge branch 'muc-presence' into 'master'
xep_0045: don't create empty item

See merge request poezio/slixmpp!51
2020-05-22 16:32:27 +02:00
Maxime “pep” Buquet
b62f0e90c1 xep_0045: don't create empty item
Only create an item if an attribute is set. Don't create it when reading
if it wasn't already present.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-05-20 00:37:46 +02:00
mathieui
9ace053992 Merge branch 'upload-filetoobig' into 'master'
xep_0363: pass more information to FileTooBig exception

See merge request poezio/slixmpp!50
2020-05-12 01:53:00 +02:00
Maxime “pep” Buquet
c7cd2fcf33 xep_0363: pass more information to FileTooBig exception
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-05-12 01:49:56 +02:00
Maxime Buquet
e57289358f Merge branch 'upload-disco-form' into 'master'
xep_0363: Ensure every form in disco#info is read

See merge request poezio/slixmpp!49
2020-05-12 01:04:41 +02:00
Maxime “pep” Buquet
4aa35c11ab xep_0363: Ensure every form in disco#info is read
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2020-05-12 01:03:50 +02:00
Paulina
1314e70460 Changing the use of 'threading' in python for more suitable 'subprocesses'. Change of English names to Polish equivalents, as requested by the authors. 2020-04-14 21:21:35 +02:00
Paulina
f84bfce5f3 Correction and editing of the tutorials.
[100%] English version
     [100%] Polish version
     [100%] Both version consistency check
     [98 %] Final sanity check + formating
2020-04-10 12:37:31 +02:00
Paulina
9fd8684c5a Correction and editing of the tutorials.
[98 %] English version
 [98  %] Polish version
 [100%] Both version consistency check
 [95 %] Final sanity check + formating
2020-03-21 17:08:31 +01:00
Paulina
fc77fb7648 Correction and editing of the tutorials.
[95 %] English version
 [95  %] Polish version
 [100%] Both version consistency check
 [95 %] Final sanity check + formating
2020-03-15 18:02:46 +01:00
Paulina
c8d802a6c7 Correction and editing of the tutorials.
[95 %] English version
            [95  %] Polish version
            [100%] Both version consistency check
            [80  %] Final sanity check + formating
2020-03-15 17:27:47 +01:00
Paulina
3529a36974 Merge branch 'tutorial' of https://lab.louiz.org/Hoacyn/slixmpp into tutorial 2020-03-15 15:27:36 +01:00
Paulina
fe6458303a Correction and editing of the tutorials.
[85 %] English version
        [90  %] Polish version
        [45 %] Both version consistency check
        [0  %] Final sanity check + formating
2020-03-15 15:26:21 +01:00
Paulina
b15d4aa0fa Correction and editing of the tutorials.
[95 %] English version
        [95 %] Polish version
        [100%] Both version consistency check
        [80 %] Final sanity check + formating
2020-03-15 15:17:00 +01:00
Paulina
01371041a3 Correction and editing of the tutorials.
[85 %] English version
    [90  %] Polish version
    [45 %] Both version consistency check
    [0  %] Final sanity check + formating
2020-03-08 21:01:51 +01:00
Paulina
9c4e3956a7 Correction and editing of the tutorials.
[80 %] English version
[0  %] Polish version
[20 %] Both version consistency check
[0  %] Final sanity check

TODO:
- comments in the code blocks
- side-by-side consistency check
2020-02-29 10:31:52 +01:00
Paulina
cd5b47f76c Eng and pl tutorials added. 2020-02-27 16:58:54 +01:00
255 changed files with 11781 additions and 1867 deletions

View File

@@ -9,9 +9,25 @@ test:
image: ubuntu:latest
script:
- apt update
- apt install -y python3 cython3 gpg
- apt install -y python3 python3-pip cython3 gpg
- pip3 install emoji aiohttp
- ./run_tests.py
test_integration:
stage: test
tags:
- docker
image: ubuntu:latest
only:
variables:
- $CI_ACCOUNT1
- $CI_ACCOUNT2
script:
- apt update
- apt install -y python3 python3-pip cython3 gpg
- pip3 install emoji aiohttp aiodns
- ./run_integration_tests.py
trigger_poezio:
stage: trigger
tags:

28
LICENSE
View File

@@ -86,34 +86,6 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
OrderedDict - A port of the Python 2.7+ OrderedDict to Python 2.6
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Copyright (c) 2009 Raymond Hettinger
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation files
(the "Software"), to deal in the Software without restriction,
including without limitation the rights to use, copy, modify, merge,
publish, distribute, sublicense, and/or sell copies of the Software,
and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
SUELTA A PURE-PYTHON SASL CLIENT LIBRARY
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

View File

@@ -31,6 +31,21 @@ To run the test suite for Slixmpp::
python run_tests.py
Integration tests require the following environment variables to be set:::
$CI_ACCOUNT1
$CI_ACCOUNT1_PASSWORD
$CI_ACCOUNT2
$CI_ACCOUNT2_PASSWORD
$CI_MUC_SERVER
where the account variables are JIDs of valid, existing accounts, and
the passwords are the account passwords. The MUC server must allow room
creation from those JIDs.
To run the integration test suite for Slixmpp::
python run_integration_tests.py
The Slixmpp Boilerplate
-------------------------

1009
doap.xml Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,96 @@
Plugin index
============
.. toctree::
:maxdepth: 2
xep_0004
xep_0009
xep_0012
xep_0013
xep_0020
xep_0027
xep_0030
xep_0033
xep_0045
xep_0047
xep_0049
xep_0050
xep_0054
xep_0059
xep_0060
xep_0065
xep_0066
xep_0070
xep_0071
xep_0077
xep_0079
xep_0080
xep_0082
xep_0084
xep_0085
xep_0086
xep_0092
xep_0106
xep_0107
xep_0108
xep_0115
xep_0118
xep_0122
xep_0128
xep_0131
xep_0133
xep_0152
xep_0153
xep_0163
xep_0172
xep_0184
xep_0186
xep_0191
xep_0196
xep_0198
xep_0199
xep_0202
xep_0203
xep_0221
xep_0222
xep_0223
xep_0224
xep_0231
xep_0235
xep_0249
xep_0256
xep_0257
xep_0258
xep_0279
xep_0280
xep_0297
xep_0300
xep_0308
xep_0313
xep_0319
xep_0332
xep_0333
xep_0334
xep_0335
xep_0352
xep_0353
xep_0359
xep_0363
xep_0369
xep_0377
xep_0380
xep_0394
xep_0403
xep_0404
xep_0405
xep_0421
xep_0422
xep_0424
xep_0425
xep_0428
xep_0437
xep_0439
xep_0444

View File

@@ -0,0 +1,21 @@
XEP 0004
========
.. module:: slixmpp.plugins.xep_0004
.. autoclass:: XEP_0004
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0004.stanza.field
:members:
:undoc-members:
.. automodule:: slixmpp.plugins.xep_0004.stanza.form
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0009
========
.. module:: slixmpp.plugins.xep_0009
.. autoclass:: XEP_0009
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0009.stanza.RPC
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0012
========
.. module:: slixmpp.plugins.xep_0012
.. autoclass:: XEP_0012
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0012.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0013
========
.. module:: slixmpp.plugins.xep_0013
.. autoclass:: XEP_0013
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0013.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0020
========
.. module:: slixmpp.plugins.xep_0020
.. autoclass:: XEP_0020
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0020.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0027
========
.. module:: slixmpp.plugins.xep_0027
.. autoclass:: XEP_0027
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0027.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,22 @@
XEP 0030
========
.. module:: slixmpp.plugins.xep_0030
.. autoclass:: XEP_0030
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0030.stanza.info
:members:
:undoc-members:
.. automodule:: slixmpp.plugins.xep_0030.stanza.items
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0033
========
.. module:: slixmpp.plugins.xep_0033
.. autoclass:: XEP_0033
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0033.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0045
========
.. module:: slixmpp.plugins.xep_0045
.. autoclass:: XEP_0045
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0045.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0047
========
.. module:: slixmpp.plugins.xep_0047
.. autoclass:: XEP_0047
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0047.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0049
========
.. module:: slixmpp.plugins.xep_0049
.. autoclass:: XEP_0049
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0049.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0050
========
.. module:: slixmpp.plugins.xep_0050
.. autoclass:: XEP_0050
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0050.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0054
========
.. module:: slixmpp.plugins.xep_0054
.. autoclass:: XEP_0054
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0054.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0059
========
.. module:: slixmpp.plugins.xep_0059
.. autoclass:: XEP_0059
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0059.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,37 @@
XEP 0060
========
.. module:: slixmpp.plugins.xep_0060
.. autoclass:: XEP_0060
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0060.stanza.base
:members:
:undoc-members:
.. automodule:: slixmpp.plugins.xep_0060.stanza.pubsub
:members:
:undoc-members:
.. automodule:: slixmpp.plugins.xep_0060.stanza.pubsub_errors
:members:
:undoc-members:
.. automodule:: slixmpp.plugins.xep_0060.stanza.pubsub_owner
:members:
:undoc-members:
.. automodule:: slixmpp.plugins.xep_0060.stanza.pubsub_event
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0065
========
.. module:: slixmpp.plugins.xep_0065
.. autoclass:: XEP_0065
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0065.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0066
========
.. module:: slixmpp.plugins.xep_0066
.. autoclass:: XEP_0066
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0066.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0070
========
.. module:: slixmpp.plugins.xep_0070
.. autoclass:: XEP_0070
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0070.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0071
========
.. module:: slixmpp.plugins.xep_0071
.. autoclass:: XEP_0071
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0071.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0077
========
.. module:: slixmpp.plugins.xep_0077
.. autoclass:: XEP_0077
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0077.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0079
========
.. module:: slixmpp.plugins.xep_0079
.. autoclass:: XEP_0079
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0079.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0080
========
.. module:: slixmpp.plugins.xep_0080
.. autoclass:: XEP_0080
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0080.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
XEP 0082
========
.. module:: slixmpp.plugins.xep_0082
.. autoclass:: XEP_0082
:members:
:exclude-members: session_bind, plugin_init, plugin_end

View File

@@ -0,0 +1,18 @@
XEP 0084
========
.. module:: slixmpp.plugins.xep_0084
.. autoclass:: XEP_0084
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0084.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0085
========
.. module:: slixmpp.plugins.xep_0085
.. autoclass:: XEP_0085
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0085.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0086
========
.. module:: slixmpp.plugins.xep_0086
.. autoclass:: XEP_0086
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0086.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0092
========
.. module:: slixmpp.plugins.xep_0092
.. autoclass:: XEP_0092
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0092.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
XEP 0106
========
.. module:: slixmpp.plugins.xep_0106
.. autoclass:: XEP_0106
:members:
:exclude-members: session_bind, plugin_init, plugin_end

View File

@@ -0,0 +1,18 @@
XEP 0107
========
.. module:: slixmpp.plugins.xep_0107
.. autoclass:: XEP_0107
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0107.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0108
========
.. module:: slixmpp.plugins.xep_0108
.. autoclass:: XEP_0108
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0108.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0115
========
.. module:: slixmpp.plugins.xep_0115
.. autoclass:: XEP_0115
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0115.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0118
========
.. module:: slixmpp.plugins.xep_0118
.. autoclass:: XEP_0118
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0118.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0122
========
.. module:: slixmpp.plugins.xep_0122
.. autoclass:: XEP_0122
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0122.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
XEP 0128
========
.. module:: slixmpp.plugins.xep_0128
.. autoclass:: XEP_0128
:members:
:exclude-members: session_bind, plugin_init, plugin_end

View File

@@ -0,0 +1,18 @@
XEP 0131
========
.. module:: slixmpp.plugins.xep_0131
.. autoclass:: XEP_0131
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0131.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
XEP 0133
========
.. module:: slixmpp.plugins.xep_0133
.. autoclass:: XEP_0133
:members:
:exclude-members: session_bind, plugin_init, plugin_end

View File

@@ -0,0 +1,18 @@
XEP 0152
========
.. module:: slixmpp.plugins.xep_0152
.. autoclass:: XEP_0152
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0152.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0153
========
.. module:: slixmpp.plugins.xep_0153
.. autoclass:: XEP_0153
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0153.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
XEP 0163
========
.. module:: slixmpp.plugins.xep_0163
.. autoclass:: XEP_0163
:members:
:exclude-members: session_bind, plugin_init, plugin_end

View File

@@ -0,0 +1,18 @@
XEP 0172
========
.. module:: slixmpp.plugins.xep_0172
.. autoclass:: XEP_0172
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0172.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0184
========
.. module:: slixmpp.plugins.xep_0184
.. autoclass:: XEP_0184
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0184.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0186
========
.. module:: slixmpp.plugins.xep_0186
.. autoclass:: XEP_0186
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0186.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0191
========
.. module:: slixmpp.plugins.xep_0191
.. autoclass:: XEP_0191
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0191.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0196
========
.. module:: slixmpp.plugins.xep_0196
.. autoclass:: XEP_0196
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0196.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0198
========
.. module:: slixmpp.plugins.xep_0198
.. autoclass:: XEP_0198
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0198.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0199
========
.. module:: slixmpp.plugins.xep_0199
.. autoclass:: XEP_0199
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0199.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0202
========
.. module:: slixmpp.plugins.xep_0202
.. autoclass:: XEP_0202
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0202.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0203
========
.. module:: slixmpp.plugins.xep_0203
.. autoclass:: XEP_0203
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0203.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0221
========
.. module:: slixmpp.plugins.xep_0221
.. autoclass:: XEP_0221
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0221.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
XEP 0222
========
.. module:: slixmpp.plugins.xep_0222
.. autoclass:: XEP_0222
:members:
:exclude-members: session_bind, plugin_init, plugin_end

View File

@@ -0,0 +1,9 @@
XEP 0223
========
.. module:: slixmpp.plugins.xep_0223
.. autoclass:: XEP_0223
:members:
:exclude-members: session_bind, plugin_init, plugin_end

View File

@@ -0,0 +1,18 @@
XEP 0224
========
.. module:: slixmpp.plugins.xep_0224
.. autoclass:: XEP_0224
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0224.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0231
========
.. module:: slixmpp.plugins.xep_0231
.. autoclass:: XEP_0231
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0231.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0235
========
.. module:: slixmpp.plugins.xep_0235
.. autoclass:: XEP_0235
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0235.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0249
========
.. module:: slixmpp.plugins.xep_0249
.. autoclass:: XEP_0249
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0249.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,9 @@
XEP 0256
========
.. module:: slixmpp.plugins.xep_0256
.. autoclass:: XEP_0256
:members:
:exclude-members: session_bind, plugin_init, plugin_end

View File

@@ -0,0 +1,18 @@
XEP 0257
========
.. module:: slixmpp.plugins.xep_0257
.. autoclass:: XEP_0257
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0257.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0258
========
.. module:: slixmpp.plugins.xep_0258
.. autoclass:: XEP_0258
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0258.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0279
========
.. module:: slixmpp.plugins.xep_0279
.. autoclass:: XEP_0279
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0279.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0280
========
.. module:: slixmpp.plugins.xep_0280
.. autoclass:: XEP_0280
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0280.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0297
========
.. module:: slixmpp.plugins.xep_0297
.. autoclass:: XEP_0297
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0297.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0300
========
.. module:: slixmpp.plugins.xep_0300
.. autoclass:: XEP_0300
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0300.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0308
========
.. module:: slixmpp.plugins.xep_0308
.. autoclass:: XEP_0308
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0308.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0313
========
.. module:: slixmpp.plugins.xep_0313
.. autoclass:: XEP_0313
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0313.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0319
========
.. module:: slixmpp.plugins.xep_0319
.. autoclass:: XEP_0319
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0319.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,26 @@
XEP 0332
========
.. module:: slixmpp.plugins.xep_0332
.. autoclass:: XEP_0332
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0332.stanza.data
:members:
:undoc-members:
.. automodule:: slixmpp.plugins.xep_0332.stanza.request
:members:
:undoc-members:
.. automodule:: slixmpp.plugins.xep_0332.stanza.response
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0333
========
.. module:: slixmpp.plugins.xep_0333
.. autoclass:: XEP_0333
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0333.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0334
========
.. module:: slixmpp.plugins.xep_0334
.. autoclass:: XEP_0334
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0334.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0335
========
.. module:: slixmpp.plugins.xep_0335
.. autoclass:: XEP_0335
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0335.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0352
========
.. module:: slixmpp.plugins.xep_0352
.. autoclass:: XEP_0352
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0352.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0353
========
.. module:: slixmpp.plugins.xep_0353
.. autoclass:: XEP_0353
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0353.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0359
========
.. module:: slixmpp.plugins.xep_0359
.. autoclass:: XEP_0359
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0359.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0363
========
.. module:: slixmpp.plugins.xep_0363
.. autoclass:: XEP_0363
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0363.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0369
========
.. module:: slixmpp.plugins.xep_0369
.. autoclass:: XEP_0369
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0369.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0377
========
.. module:: slixmpp.plugins.xep_0377
.. autoclass:: XEP_0377
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0377.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0380
========
.. module:: slixmpp.plugins.xep_0380
.. autoclass:: XEP_0380
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0380.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0394
========
.. module:: slixmpp.plugins.xep_0394
.. autoclass:: XEP_0394
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0394.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0403
========
.. module:: slixmpp.plugins.xep_0403
.. autoclass:: XEP_0403
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0403.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0404
========
.. module:: slixmpp.plugins.xep_0404
.. autoclass:: XEP_0404
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0404.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0405
========
.. module:: slixmpp.plugins.xep_0405
.. autoclass:: XEP_0405
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0405.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0421
========
.. module:: slixmpp.plugins.xep_0421
.. autoclass:: XEP_0421
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0421.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0422
========
.. module:: slixmpp.plugins.xep_0422
.. autoclass:: XEP_0422
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0422.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0424
========
.. module:: slixmpp.plugins.xep_0424
.. autoclass:: XEP_0424
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0424.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0425
========
.. module:: slixmpp.plugins.xep_0425
.. autoclass:: XEP_0425
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0425.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0428
========
.. module:: slixmpp.plugins.xep_0428
.. autoclass:: XEP_0428
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0428.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0437
========
.. module:: slixmpp.plugins.xep_0437
.. autoclass:: XEP_0437
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0437.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0439
========
.. module:: slixmpp.plugins.xep_0439
.. autoclass:: XEP_0439
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0439.stanza
:members:
:undoc-members:

View File

@@ -0,0 +1,18 @@
XEP 0444
========
.. module:: slixmpp.plugins.xep_0444
.. autoclass:: XEP_0444
:members:
:exclude-members: session_bind, plugin_init, plugin_end
Stanza elements
---------------
.. automodule:: slixmpp.plugins.xep_0444.stanza
:members:
:undoc-members:

View File

@@ -2,6 +2,7 @@ IQ Stanza
=========
.. module:: slixmpp.stanza
:noindex:
.. autoclass:: Iq
:members:

View File

@@ -2,6 +2,7 @@ Message Stanza
==============
.. module:: slixmpp.stanza
:noindex:
.. autoclass:: Message
:members:

View File

@@ -1,4 +1,5 @@
.. module:: slixmpp.xmlstream.tostring
:noindex:
.. _tostring:

View File

@@ -30,7 +30,11 @@ release = ".".join(version.split(".")[0:2])
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.intersphinx']
extensions = [
'sphinx.ext.autodoc', 'sphinx.ext.viewcode', 'sphinx.ext.intersphinx',
'sphinx_autodoc_typehints',
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

View File

@@ -38,24 +38,24 @@ Event Index
subscription decisions.
chatstate_active
- **Data:**
- **Source:**
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0085.xep_0085`
chatstate_composing
- **Data:**
- **Source:**
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0085.xep_0085`
chatstate_gone
- **Data:**
- **Source:**
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0085.xep_0085`
chatstate_inactive
- **Data:**
- **Source:**
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0085.xep_0085`
chatstate_paused
- **Data:**
- **Source:**
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0085.xep_0085`
disco_info
- **Data:** :py:class:`~slixmpp.plugins.xep_0030.stanza.DiscoInfo`
@@ -112,8 +112,8 @@ Event Index
Signal that an unavailable presence stanza has been received from a JID.
groupchat_invite
- **Data:**
- **Source:**
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0045.XEP_0045`
groupchat_direct_invite
- **Data:** :py:class:`~slixmpp.Message`
@@ -172,20 +172,20 @@ Event Index
Triggered whenever a data form is received inside a message.
muc::[room]::got_offline
- **Data:**
- **Source:**
- **Data:** :py:class:`~slixmpp.Presence`
- **Source:** :py:class:`~slixmpp.plugins.xep_0045.XEP_0045`
muc::[room]::got_online
- **Data:**
- **Source:**
- **Data:** :py:class:`~slixmpp.Presence`
- **Source:** :py:class:`~slixmpp.plugins.xep_0045.XEP_0045`
muc::[room]::message
- **Data:**
- **Source:**
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0045.XEP_0045`
muc::[room]::presence
- **Data:**
- **Source:**
- **Data:** :py:class:`~slixmpp.Presence`
- **Source:** :py:class:`~slixmpp.plugins.xep_0045.XEP_0045`
presence_available
- **Data:** :py:class:`~slixmpp.Presence`
@@ -280,3 +280,127 @@ Event Index
stream_error
- **Data:** :py:class:`~slixmpp.stanza.StreamError`
- **Source:** :py:class:`~slixmpp.BaseXMPP`
reactions
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0444.XEP_0444`
carbon_received
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0280.XEP_0280`
carbon_sent
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0280.XEP_0280`
marker
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0333.XEP_0333`
marker_received
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0333.XEP_0333`
marker_displayed
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0333.XEP_0333`
marker_acknowledged
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0333.XEP_0333`
attention
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0224.XEP_0224`
message_correction
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0308.XEP_0308`
receipt_received
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0184.XEP_0184`
jingle_message_propose
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0353.XEP_0353`
jingle_message_retract
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0353.XEP_0353`
jingle_message_accept
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0353.XEP_0353`
jingle_message_proceed
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0353.XEP_0353`
jingle_message_reject
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0353.XEP_0353`
room_activity
- **Data:** :py:class:`~slixmpp.Presence`
- **Source:** :py:class:`~slixmpp.plugins.xep_0437.XEP_0437`
room_activity_bare
- **Data:** :py:class:`~slixmpp.Presence`
- **Source:** :py:class:`~slixmpp.plugins.xep_0437.XEP_0437`
sm_enabled
- **Data:** :py:class:`~slixmpp.plugins.xep_0198.stanza.Enabled`
- **Source:** :py:class:`~slixmpp.plugins.xep_0198.XEP_0198`
sm_disabled
- **Data:**
- **Source:** :py:class:`~slixmpp.plugins.xep_0198.XEP_0198`
ibb_stream_start
- **Data:** :py:class:`~slixmpp.plugins.xep_0047.stream.IBBBytestream`
- **Source:** :py:class:`~slixmpp.plugins.xep_0047.XEP_0047`
ibb_stream_end
- **Data:** :py:class:`~slixmpp.plugins.xep_0047.stream.IBBBytestream`
- **Source:** :py:class:`~slixmpp.plugins.xep_0047.XEP_0047`
ibb_stream_data
- **Data:** :py:class:`~slixmpp.plugins.xep_0047.stream.IBBBytestream`
- **Source:** :py:class:`~slixmpp.plugins.xep_0047.XEP_0047`
stream:[stream id]:[peer jid]
- **Data:** :py:class:`~slixmpp.plugins.xep_0047.stream.IBBBytestream`
- **Source:** :py:class:`~slixmpp.plugins.xep_0047.XEP_0047`
command
- **Data:** :py:class:`~slixmpp.Iq`
- **Source:** :py:class:`~slixmpp.plugins.xep_0050.XEP_0050`
command_[action]
- **Data:** :py:class:`~slixmpp.Iq`
- **Source:** :py:class:`~slixmpp.plugins.xep_0050.XEP_0050`
pubsub_publish
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0060.XEP_0060`
pubsub_retract
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0060.XEP_0060`
pubsub_purge
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0060.XEP_0060`
pubsub_delete
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0060.XEP_0060`
pubsub_config
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0060.XEP_0060`
pubsub_subscription
- **Data:** :py:class:`~slixmpp.Message`
- **Source:** :py:class:`~slixmpp.plugins.xep_0060.XEP_0060`

View File

@@ -18,7 +18,7 @@ messages sent to it. We will also go through adding some basic command line conf
for enabling or disabling debug log outputs and setting the username and password
for the bot.
For the command line options processing, we will use the built-in ``optparse``
For the command line options processing, we will use the built-in ``argparse``
module and the ``getpass`` module for reading in passwords.
TL;DR Just Give Me the Code
@@ -39,7 +39,8 @@ To get started, here is a brief outline of the structure that the final project
import asyncio
import logging
import getpass
from optparse import OptionParser
from argparse import ArgumentParser
import slixmpp
@@ -93,9 +94,9 @@ we also need to define the ``self.start`` handler.
.. code-block:: python
def start(self, event):
async def start(self, event):
self.send_presence()
self.get_roster()
await self.get_roster()
.. warning::
@@ -144,6 +145,11 @@ The XMPP stanzas from the roster retrieval process could look like this:
</query>
</iq>
Additionally, since :meth:`get_roster <slixmpp.clientxmpp.ClientXMPP.get_roster>` is using
``<iq/>`` stanzas, which will always receive an answer, it should be awaited on, to keep
a synchronous flow.
Responding to Messages
~~~~~~~~~~~~~~~~~~~~~~
Now that an ``EchoBot`` instance handles :term:`session_start`, we can begin receiving and
@@ -212,8 +218,7 @@ Command Line Arguments and Logging
While this isn't part of Slixmpp itself, we do want our echo bot program to be able
to accept a JID and password from the command line instead of hard coding them. We will
use the ``optparse`` module for this, though there are several alternative methods, including
the newer ``argparse`` module.
use the ``argparse`` module for this.
We want to accept three parameters: the JID for the echo bot, its password, and a flag for
displaying the debugging logs. We also want these to be optional parameters, since passing
@@ -222,22 +227,29 @@ a password directly through the command line can be a security risk.
.. code-block:: python
if __name__ == '__main__':
optp = OptionParser()
# Setup the command line arguments.
parser = ArgumentParser(description=EchoBot.__doc__)
optp.add_option('-d', '--debug', help='set logging to DEBUG',
action='store_const', dest='loglevel',
const=logging.DEBUG, default=logging.INFO)
optp.add_option("-j", "--jid", dest="jid",
help="JID to use")
optp.add_option("-p", "--password", dest="password",
help="password to use")
# Output verbosity options.
parser.add_argument("-q", "--quiet", help="set logging to ERROR",
action="store_const", dest="loglevel",
const=logging.ERROR, default=logging.INFO)
parser.add_argument("-d", "--debug", help="set logging to DEBUG",
action="store_const", dest="loglevel",
const=logging.DEBUG, default=logging.INFO)
opts, args = optp.parse_args()
# JID and password options.
parser.add_argument("-j", "--jid", dest="jid",
help="JID to use")
parser.add_argument("-p", "--password", dest="password",
help="password to use")
if opts.jid is None:
opts.jid = raw_input("Username: ")
if opts.password is None:
opts.password = getpass.getpass("Password: ")
args = parser.parse_args()
if args.jid is None:
args.jid = input("Username: ")
if args.password is None:
args.password = getpass("Password: ")
Since we included a flag for enabling debugging logs, we need to configure the
``logging`` module to behave accordingly.
@@ -248,7 +260,7 @@ Since we included a flag for enabling debugging logs, we need to configure the
# .. option parsing from above ..
logging.basicConfig(level=opts.loglevel,
logging.basicConfig(level=args.loglevel,
format='%(levelname)-8s %(message)s')
@@ -276,52 +288,36 @@ at this stage. For example, let's say we want our bot to support `service discov
If the ``EchoBot`` class had a hard dependency on a plugin, we could register that plugin in
the ``EchoBot.__init__`` method instead.
.. note::
If you are using the OpenFire server, you will need to include an additional
configuration step. OpenFire supports a different version of SSL than what
most servers and Slixmpp support.
.. code-block:: python
import ssl
xmpp.ssl_version = ssl.PROTOCOL_SSLv3
Now we're ready to connect and begin echoing messages. If you have the package
``aiodns`` installed, then the :meth:`slixmpp.clientxmpp.ClientXMPP` method
``aiodns`` installed, then the :meth:`slixmpp.clientxmpp.ClientXMPP.connect` method
will perform a DNS query to find the appropriate server to connect to for the
given JID. If you do not have ``aiodns``, then Slixmpp will attempt to
connect to the hostname used by the JID, unless an address tuple is supplied
to :meth:`slixmpp.clientxmpp.ClientXMPP`.
to :meth:`slixmpp.clientxmpp.ClientXMPP.connect`.
.. code-block:: python
if __name__ == '__main__':
# .. option parsing & echo bot configuration
xmpp.connect():
xmpp.process(forever=True)
if xmpp.connect():
xmpp.process(block=True)
else:
print('Unable to connect')
To begin responding to messages, you'll see we called :meth:`slixmpp.basexmpp.BaseXMPP.process`
which will start the event handling, send queue, and XML reader threads. It will also call
the :meth:`slixmpp.plugins.base.BasePlugin.post_init` method on all registered plugins. By
passing ``block=True`` to :meth:`slixmpp.basexmpp.BaseXMPP.process` we are running the
main processing loop in the main thread of execution. The :meth:`slixmpp.basexmpp.BaseXMPP.process`
call will not return until after Slixmpp disconnects. If you need to run the client in the background
for another program, use ``block=False`` to spawn the processing loop in its own thread.
The :meth:`slixmpp.basexmpp.BaseXMPP.connect` will only schedule a connection
asynchronously. To actually connect, you need to let the event loop take over.
This is done with the :meth:`slixmpp.basexmpp.BaseXMPP.process` method,
which can either run forever (``forever=True``, the default), run for a (maximum)
duration of time (``timeout=n``), and/or run until it gets disconnected (``forever=False``).
However, calling ``process()`` is not required if you already have an event loop
running, so you can handle the logic around it however you like.
.. note::
Before 1.0, controlling the blocking behaviour of :meth:`slixmpp.basexmpp.BaseXMPP.process` was
done via the ``threaded`` argument. This arrangement was a source of confusion because some users
interpreted that as controlling whether or not Slixmpp used threads at all, instead of how
the processing loop itself was spawned.
The statements ``xmpp.process(threaded=False)`` and ``xmpp.process(block=True)`` are equivalent.
Before slixmpp, :meth:slixmpp.basexmpp.BaseXMPP.process` took ``block`` and ``threaded``
arguments. These do not make sense anymore and have been removed. Slixmpp does not use
threads at all.
.. _echobot_complete:

View File

@@ -60,12 +60,11 @@ has been established:
.. code-block:: python
def start(self, event):
self.get_roster()
async def start(self, event):
await self.get_roster()
self.send_presence()
self.plugin['xep_0045'].join_muc(self.room,
self.nick,
wait=True)
self.nick)
Note that as in :ref:`echobot`, we need to include send an initial presence and request
the roster. Next, we want to join the group chat, so we call the

Some files were not shown because too many files have changed in this diff Show More