Commit Graph

3077 Commits

Author SHA1 Message Date
mathieui
1f14fb54c2
XEP-0060: fix get_item_ids (fix #3548)
missing return statement, the function would work with callbacks, but
that is a bit meh.
2025-02-08 12:30:02 +01:00
mathieui
651e0ea593
docs: improve using_asyncio page (hopefully fixes #3562)
make event loop usage a bit clearer, and fix the examples.
2025-02-08 12:26:17 +01:00
mathieui
4ac41a5250
Add a way to get identities as dict (fixes #3566) 2025-02-08 12:11:07 +01:00
mathieui
e03b7661c1 XEP-0446: complete support and tests 2025-02-07 20:33:22 +00:00
DinoThor
e955cd308a Fix bad reference with client & method call 2025-02-07 13:52:15 +00:00
mathieui
2db5e0199c
docs: add lots of missing xeps, fix some issues
sphinx was unhappy with some formatting artifacts
2025-02-03 00:16:51 +01:00
mathieui
bf2e006f88
docs: fix bad targets in projects page
and actually the slixmpp chat room is not a chatroom for random bots
written with slixmpp
2025-02-02 23:43:00 +01:00
mathieui
8c8bb5da8b
doap: add missing xep 264 and 469 support 2025-01-31 12:23:11 +01:00
mathieui
bd638f1b39
doap: add hats support since 1.8.6 2025-01-31 11:12:37 +01:00
mathieui
0ff9e3661d XMLStream: allow custom sslcontext provisioning (fixes #3582)
For some applications that have strict requirements on blocking calls,
it might be beneficial to create the SSLContext in advance and
provide it to the client/componentxmpp instance that will be going
through kwargs until XMLStream.

The context will be reconfigured later on based on user parameters, but
it is highly recommended to set it up in a secure way.
2025-01-30 11:08:41 +00:00
mathieui
5ec378cccd
xep-0055: fix stanza test 2025-01-30 09:35:41 +01:00
nicoco
a9fc955eda fix: add default error type for "payment-required" condition 2025-01-27 16:36:07 +01:00
nicoco
05860f71ac ci: follow linter recommendations 2025-01-27 16:36:07 +01:00
mathieui
1482bcc395 basexmpp: make_iq no longer defaults to id="0"
having a hardcoded default ID in make_iq is a bad idea, particularly
since it will overwrite the (good) id produced byt Iq() when a stream is
available.

This is arguably a breaking change, but I certainly hope it is not
breaking anything in the real world.
2025-01-26 18:03:15 +01:00
nicoco
2e736bc715 feat: support XEP-0492 (Chat Notification Settings) 2025-01-26 16:24:31 +00:00
nicoco
8d984cd8a1 XEP-0004: fix: prevent multiple <values> for 'text-single' field
According to XEP-0004:
- if there is no "type" attribute on a <field />, we should assume it is
  "text-single";
- "text-single" MUST NOT contain morethan one <value />.

Before this patch, not specifying a field type and passing a multi-line
string would result in an illegal stanza.

While it would be cleaner to log a warning or even raise an exception if
set_value() is called with an incompatible type, this breaks a lot of
tests and backward-compatibility, so we introduce some heuristic in
FormField.set_value() to infer the field type based on the provided
value instead.

I also changed FormField.get_value() so that it returns a list by
default for 'text-multi' fields. This is a breaking change, but I have
not found the justification for the previous behaviour.
2025-01-24 14:33:16 +00:00
nicoco
100014651c cq: remove unused files 2025-01-24 15:30:24 +01:00
nicoco
f9a9a0dcb7 fix: add default error type for "policy-violation" condition 2025-01-24 09:53:42 +01:00
nicoco
c585ec5983 fix: add missing "policy-violation" to error conditions 2025-01-22 21:32:57 +01:00
nicoco
27bbb1ef95 xep_0425: add missing 'id' attribute to 'Moderate' stanza plugin 2024-12-30 14:46:25 +01:00
mathieui
5dfc622539
itests: fix XEP-0424 test
broken due to the new XEP version
2024-12-29 01:08:05 +01:00
mathieui
2ab9b5a05c
ci: add setuptools, remove 3.7/3.8 and add 3.13 2024-12-29 00:50:53 +01:00
mathieui
09d9320b91
Release 1.8.6 2024-12-26 22:39:49 +01:00
mathieui
fbf298c36d
XEP-0030: fix tests
Use None as the "no value" value, rather than ''.
2024-12-26 09:42:33 +01:00
mathieui
7153d79006 itests/examples: integrate imghdr code directly (fix #3570)
Python 3.13 removes it, and I would rather not add another dependency
only for tests or examples…
2024-12-14 16:08:49 +01:00
mathieui
1d3e03a923 XEP-0030: make read operations more resilient
Reading valid XML which does not respect the XEP schema should not crash
the parser badly.
2024-12-14 16:00:24 +01:00
mathieui
3d0b09e2e2 xmlstream: prevent stanza parsing from crashing the whole thing
If an error happened while parsing a stanza, it would bring the whole
program down and disconnect instead of logging an error. And the DEBUG
log happened afterwards (so, never).
2024-12-14 15:52:51 +01:00
nicoco
23544731ef Support XEP-0490 (Message Display Synchronization) 2024-12-11 21:29:37 +00:00
nicoco
a18a6c4eb8 xep-0425: update to version 0.3.0 2024-12-11 21:24:12 +00:00
nicoco
dd903b1792 xep-0424: update to version 0.4.0 2024-12-11 21:24:12 +00:00
mathieui
cf3b30120e repo: remove github pull request template
codeberg annoyingly picks it up, which creates confusion for
contributors
2024-12-11 22:18:38 +01:00
jinyu
d86dccaf85 enhancement: Update type hints 2024-12-11 21:17:23 +00:00
jinyu
075812adf3 fix: Update msg_kwargs documentation to clarify required parameters for make_message 2024-12-11 21:16:37 +00:00
jinyu
8955ece461 Fix missing parameters 2024-12-11 21:16:37 +00:00
jinyu
5051c60262 enhancement: Refactor reply handling in XEP-0461; add fallback support and improve message construction 2024-12-11 21:16:37 +00:00
mathieui
c495eb73fc xmlstream: add stanza_not_sent event (fixes #3559) 2024-12-11 22:01:34 +01:00
jinyu
12c516d365 fix: Add future annotations import to base.py for improved type hinting 2024-11-19 18:44:33 +01:00
jinyu
d9b0b6dfe6 fix: Correct JID comparison in MUC plugin for bare JID matching 2024-11-19 18:44:27 +01:00
jinyu
7979e3b603 Resolve circular import 2024-11-19 18:44:20 +01:00
jinyu
f24a7679e5 enhancement: Improve JID handling and logging in MUC plugin; update status code return type 2024-11-19 18:44:11 +01:00
jinyu
df0ecfc142 Update the type of BasePlugin.xmpp to BaseXMPP. Increase the timeout for join_muc_wait. 2024-11-19 18:43:58 +01:00
jinyu
e79b98b266 add default timeout value 2024-11-19 18:43:49 +01:00
jinyu
5ed5e60b20 Fix: AttributeError in get_nick and jid_in_room due to incorrect JID type 2024-11-19 18:43:41 +01:00
mathieui
e5fe53ef45 tests: remove distutils use 2024-10-08 10:31:15 +02:00
mathieui
93608bd2f4 setup.py: Add python versions 2024-10-08 10:29:28 +02:00
nicoco
3b2386ee2f stanzabase: Pass problematic object to TypeError raised by ElementBase.append()
This should help debugging those type of errors.
2024-09-27 13:00:28 +02:00
nicoco
b94c6716f7 xep-0231: fix TypeError when BoB cannot be found
Although it is not documented whether the get_bob API
call can return None, the default implementation can,
which raises a TypeError when the requested BoB is not
available. This commit prevents such TypeError by
raising a XMPPError instead.

References: https://todo.sr.ht/~nicoco/slidcord/23
2024-09-27 10:28:24 +02:00
jinyu
db8ce9187c feat: Add is_correction method to XEP-0308 Last Message Correction plugin 2024-09-08 00:39:10 +08:00
mathieui
7f926a944a setup.py: Do not install aiodns on windows (fix #3556)
aiodns is broken on the default windows event loop and the workaround
has significant downsides. This has downsides too as it prevents
resolution of SRV records by default.
2024-08-25 13:18:31 +02:00
sch
e96f8e1ed0 Correct an MUC-related error message which indicates the requirement of a JID 2024-06-20 19:00:20 +00:00