Commit graph

139 commits

Author SHA1 Message Date
36d1cba2a9
CI: Force changelog updates
Some checks are pending
Build / lint (push) Waiting to run
Build / test-stable (push) Blocked by required conditions
Build / test-nightly (push) Blocked by required conditions
Changelog updates are now required in MRs by default. If there is a
match for "\<skip.\?changelog\>" in the commit message, this will be
ignored.

$CI_COMMIT_MESSAGE mangles newlines so it's not possible to require the
string to be on its own line, that means it would also trigger within a
wall of text, which makes it less obvious.

Also, I wasn't able to find a CI variable which has the ref of the
branch the MR is set against, to build a tree-ish than spans over the
whole MR and not just HEAD.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-12-23 12:22:22 +01:00
xmppftw
668cc05445 xmpp: Replace std stuff with alloc/core stuff 2024-12-19 20:39:18 +01:00
xmppftw
c1a3c85556 xmpp: Implement Deref<Target=ResourcePart> for RoomNick 2024-12-18 21:55:03 +01:00
xmppftw
793b76d0d5 xmpp: More nicks are typed as RoomNick 2024-12-18 21:55:01 +01:00
xmppftw
48cb79b2d1 xmpp: Implement FromStr for RoomNick 2024-12-18 21:26:30 +01:00
xmppftw
b8f74e6bce xmpp: Common structure for imports 2024-12-18 19:26:40 +01:00
xmppftw
0ec9103b28 xmpp: Rewrite other messages with Agent::send_raw_message 2024-12-18 19:18:34 +01:00
xmppftw
b4d3252da4 xmpp: Add Agent::send_raw_message 2024-12-18 19:18:22 +01:00
xmppftw
e19a7988ed xmpp: Agent::send_message is only for normal messages 2024-12-18 19:17:55 +01:00
xmppftw
d98ed615a5 xmpp: Agent::send_room_private_message takes RoomPrivateMessageSettings 2024-12-18 19:17:39 +01:00
xmppftw
7991cef904 Add tests for crate exports ; add structure to imports/exports 2024-12-18 18:03:18 +00:00
xmppftw
3fd8285a29 xmpp: RoomNick is newtype wrapper for ResourcePart 2024-12-18 15:43:09 +00:00
xmppftw
5477cf1240 xmpp: Use ResourcePart for sender of room events 2024-12-18 15:43:09 +00:00
xmppftw
c16456f381 parsers/xmpp: MUC bookmarks have nickname typed as ResourcePart 2024-12-18 15:43:09 +00:00
Jonas Schäfer
35ce86243f client: use stanzastream! 2024-12-17 18:16:02 +01:00
xmppftw
8c3c8c7c97 hello_bot accepts a list of room JIDs to join to say hello 2024-12-17 00:27:50 +00:00
xmppftw
fdec34afde Add JoinRoomSettings, LeaveRoomSettings, and RoomMessageSettings 2024-12-17 00:27:50 +00:00
xmppftw
6d7a95b6ca Remove xmpp::Event::{JoinRoom,LeaveRoom,LeaveAllRooms} 2024-12-16 22:36:25 +01:00
Emmanuel Gil Peyrot
011585594f xmpp: Adapt to xmpp-parsers changes wrt autojoin
This attribute is now a simple bool instead of an enum.
2024-12-16 13:32:49 +00:00
Jonas Schäfer
4cfe4f8429 xmlstream: implement simple timeout logic
This allows to detect and handle dying streams without getting stuck
forever.

Timeouts are always wrong, though, so we put the burden of choosing the
right values (mostly) on the creator of a stream.
2024-09-01 10:02:36 +02:00
Jonas Schäfer
ab10e30ac0 Port crates to use new XSO-based xmlstream 2024-08-29 16:47:13 +02:00
xmppftw
df106dfbaf Relative dependencies 2024-08-12 10:39:09 +00:00
xmppftw
0b58561003 Rename AsyncClient to Client 2024-08-10 16:57:51 +02:00
xmppftw
311e7406f0 Make Client and Component more unified, and connectors too 2024-08-10 16:57:49 +02:00
xmppftw
ec3c7694a7 Moved starttls connector to tokio_xmpp::connect::starttls module 2024-08-10 16:49:26 +02:00
xmppftw
23e943825f xmpp::Agent::wait_for_events cannot error 2024-08-08 15:43:52 +02:00
xmppftw
ba6a7c4744 Use tokio::sync::RwLock instead of std 2024-08-06 16:04:04 +02:00
xmppftw
fa99c09585 Indicate which feature flag for each module/type 2024-08-05 11:14:41 +02:00
xmppftw
eb51b05c13 Reexport tokio_xmpp from xmpp crate 2024-07-31 16:58:30 +00:00
10acdf1e78 xmpp: Bump version to 0.6.0
Some checks failed
Build / lint (push) Has been cancelled
Build / test-stable (push) Has been cancelled
Build / test-nightly (push) Has been cancelled
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-28 20:39:15 +02:00
eae6cb2c97 xmpp: Update ChangeLog
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-28 20:39:15 +02:00
1a452523bd
tokio-xmpp: Bump version to 4.0
Some checks failed
Build / lint (push) Has been cancelled
Build / test-stable (push) Has been cancelled
Build / test-nightly (push) Has been cancelled
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-28 01:00:01 +02:00
Emmanuel Gil Peyrot
5fc12c45b5 xmpp: Use tokio-xmpp’s reexports of jid and minidom 2024-07-25 14:36:09 +00:00
86c13611ba Remove unused paths in multiple Cargo.toml
Paths are already patched in the workspace's [patch.crates-io] block.
Not sure why this was added in the first place.

Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-07-23 16:28:38 +00:00
Jonas Schäfer
80efd2eb19 Ignore missing disco#info feature in disco#info responses
xmpp-rs normally has the stance to get buggy implementations fixed
rather than dropping checks. In this particular case I think this is not
a good use of resources:

- The disco#info feature var conveys no actual information:
  If an implementation replies properly to a disco#info query, it is
  already implied that it supports the protocol.

- There are broken server implementations out there.
  A lot of them (all recent (>= 0.10 && < 0.13 AFAICT) Prosody IM
  instances). At this point in time, xmpp-rs is unable to query
  disco#info from MUCs hosted on such prosody versions, except by
  workarounds (such as the one removed in this diff).

- XEP-0030 now features a note which reads:

  > Note: Some entities are known not to advertise the
  > `http://jabber.org/protocol/disco#info` feature within their
  > responses, contrary to this specification. Entities receiving
  > otherwise valid responses which do not include this feature SHOULD
  > infer the support.

The case would be different if there were no (deployed) implementations
which had this bug or if the bug actually had an effect on clients.
Especially the latter is not the case though, as pointed out above.

Hence, I conclude that this check is overly pedantic and the resources
(time, emotional energy of dealing with bugs, punching patches through
to stable distributions, etc. etc.) spent on getting this fixed would
be better invested elsewhere.

In addition, the workaround is extremely ugly and, even in the xmpp-rs
implementation, has no test coverage. Without test coverage of such an
implementation, it is bound to break in funny ways when xmpp-rs changes
the strings of its error messages (which is something one might do even
outside a breaking release).
2024-06-16 10:52:51 +02:00
xmppftw
034976748a Add serde feature for xmpp crate 2024-06-05 11:20:33 +02:00
xmppftw
aee4c79110 Add syntax-hightlighting feature for xmpp crate 2024-06-04 19:37:54 +02:00
xmppftw
cde6450b78 OpenSSL is optional 2024-06-02 22:47:28 +02:00
Emmanuel Gil Peyrot
002c2803d4 Fix typos across the codebase (thanks codespell!) 2024-05-14 05:46:02 +00:00
Emmanuel Gil Peyrot
f725994fe0 Bump all dependencies but rustls and webpki-roots
The latter have changed their API a bit, while everything else is still
compatible.
2024-05-04 12:42:53 +02:00
Jonas Schäfer
2e9c9411a3 jid: rewrite public types
This moves InnerJid into Jid and reformulates BareJid and FullJid in
terms of Jid.

Doing this has the key advantage that FullJid and BareJid can deref to
and borrow as Jid. This, in turn, has the advantage that they can be
used much more flexibly in HashMaps. However, this is (as we say in
Germany) future music; this commit only does the internal reworking.

Oh and also, it saves 20% memory on Jid objects.

Fixes #122 more thoroughly, or rather the original intent behind it.
2024-04-15 18:21:24 +02:00
Jonas Schäfer
7fce1146e0 Offer {Resource,Node,Domain}Ref on Jid API
This provides a non-copying API, which is generally favourable. The
other accessors were removed, because the intent was to provide this
"most sensible" API via the "default" (i.e. shortest, most concisely
named) functions.
2024-03-10 10:51:01 +01:00
Emmanuel Gil Peyrot
1bab5c3cd9 Remove redundant imports
These became warnings in a recent nightly.

The TryFrom/TryInto imports were missed in
4089891f6c, but the rest are truly
redundant.
2024-02-27 22:57:18 +01:00
99036735a3
xmpp: Rename ClientBuilder::new_with_server to new_with_connector
Some checks failed
Build / lint (push) Has been cancelled
Build / test-stable (push) Has been cancelled
Build / test-nightly (push) Has been cancelled
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-02-06 01:14:50 +01:00
xmpp ftw
9d5019ecdd Fix last cargo doc warnings
Signed-off-by: Maxime “pep” Buquet <pep@bouah.net>
2024-01-27 17:44:48 +00:00
xmppftw@kl.netlib.re
1ce8145a7d Fix unused variable warnings when avatars disabled 2024-01-21 13:55:39 +01:00
Werner Kroneman
e36b8d4fb9 Exposed bound_jid on Agent. 2024-01-10 17:12:59 +01:00
moparisthebest
54de8d9951
Fix building xmpp with no-default-features 2024-01-03 20:01:05 -05:00
moparisthebest
38bfba4a18
xmpp crate now supports ServerConnector 2024-01-03 19:34:02 -05:00
moparisthebest
733d005f51
DNS/TLS deps are now optional, component now also uses ServerConnector 2024-01-01 02:09:41 -05:00