Commit Graph
140 Commits
Author SHA1 Message Date
Luca Matei Pintilie df83dd19ae Don't hardcode ver, update node name, and add tests 2026-08-19 21:30:27 +02:00
Stephen Paul Weber 567b139e1c Allow disco queries with a node (needed for CAPS) 2026-08-02 18:13:39 +02:00
Stephen Paul Weber a9dae0621a Add gateway/irc and caps 2026-08-01 00:15:06 +02:00
poVoq 814bb67df8 Fix disco for IRC servers
They should not advertise that they are MUCs since they are not.

Backport from: https://git.sr.ht/~singpolyma/biboumi/commit/764878fb0f357ec42b59b58d199fe2d5a046f998
2025-10-12 17:50:25 +02:00
Luca Matei Pintilie 9c92f7ce4a Bounce message corrections
On IRC it is confusing when an XMPP user "corrects" a message, but on
the other side a new message is sent. To prevent spam and confusion, do
not allow message corrections at all, and instead return an error if
attempted.

Fixes: #3436
Fixes: #3480
2025-10-12 17:48:33 +02:00
Link Mauve 7cd4e06f84 Support all allowed channel prefixes
RFC 2812 specifies in §1.3 that “Channels names are strings (beginning
with a '&', '#', '+' or '!' character) of length up to fifty (50)
characters.”

We previously only allowed the first two prefix characters, or any other
one if the server overrides the list with ISUPPORT.
2025-07-29 16:04:36 +02:00
louiz’ 80c5a0e150 Use recipient-unavailable when we are not connected to the IRC server
Instead of remote-server-not-found

See #3427
2021-01-15 12:34:30 +01:00
louiz’ 9cb6a0c2c9 Entirely remove the code for the “preferred_from” nick
Since private messages are now always coming from the server-wide JIDs
2020-09-23 23:38:46 +02:00
louiz’ 212e8e5989 Merge remote-tracking branch 'linkmauve/die-gc1.0-die' 2020-03-11 18:41:43 +01:00
louiz’ 2c4ffbf25a Consider the nick change only if it is NOT a join 2020-03-11 15:27:16 +01:00
louiz’ fc22e06317 Fix a type stable-id -> stanza-id, and add a test case to be exhaustive 2020-03-11 00:32:18 +01:00
louiz’ 40d2168ae5 Announce the urn:xmpp:sid:0 NS in MUC's disco#info
As required by XEP 0359

Should fix #3369
2020-03-11 00:19:19 +01:00
louiz’ e967088986 Make sure we keep the stable-id and origin-id nodes when required
See https://xmpp.org/extensions/xep-0359.html
2020-03-11 00:13:46 +01:00
louiz’ fd98e60a1d Avoid nick changes when joining a room that was already joined
By an other resource, or anything

fix #3423
2020-03-02 23:20:54 +01:00
Emmanuel Gil Peyrot 14fe971183 Don’t treat presence updates as MUC joins
If the user sends a directed presence to an unjoined MUC without a <x/>
element, send a presence error back instead of attempting to join it
again, as this is almost never what the user wants.

Fixes #3415.
2019-11-13 23:25:17 +01:00
louiz’ 61757e4822 Mark all rooms as non-anonymous
close #3390
2019-09-23 22:47:20 +02:00
Jonas Schäfer b68f36056d XEP-0410: implement server-side optimisation for self-pings
This prevents the ping from round-tripping through IRC and
possibly a random other client of the user. Please see XEP-0410
for the rationale.

Fixes #3385.
2019-08-20 21:42:43 +02:00
louiz’ 88fe1783bf Do not change our nick if we send a presence to a non-joined channel
fix #3378
2018-09-17 22:36:59 +02:00
louiz’ 478619b10a Trivial little syntax changes 2018-08-26 15:42:38 +02:00
louiz’ b1564e4ddc Fix a bunch of int to unsigned int conversion warnings 2018-08-23 20:31:31 +02:00
louiz’ 782732ba16 Remove a bunch of useless empty lines 2018-08-04 14:50:33 +02:00
louiz’ 21a79b7bad Reject messages from unjoined resources, with an error
fix #3346
2018-06-19 21:33:33 +02:00
louiz’ 2f0e26db4c Channels’ disco#info includes the number of participants
fix #3311
2018-06-17 15:16:49 +02:00
louiz’ 760076a33a Make the global ad-hoc configure command available in fixed mode
fix #3360
2018-06-01 12:44:40 +02:00
louiz’ b0168fd45b mam: Send “fin complete” only when appropriate
Also simplify how we did the whole “limit + 1”
And fix one bad interpretation of the XEP for the case where the query has
no after or before restriction.

fix #3349
2018-04-29 22:18:26 +02:00
louiz’ 61de6b1dac Revert "Use a different Date data type"
This reverts commit 857c7d3972.
2018-04-24 20:25:40 +02:00
louiz’ a90f196a1c Revert "Use the Date to find a next page in RSM, not the id"
This reverts commit 5ef7ba0802.
2018-04-24 20:25:39 +02:00
Emmanuel Gil Peyrot 0d487f40c5 Use Config::is_in_list() to allow for multiple admins 2018-04-16 00:53:25 +02:00
louiz’ 5ef7ba0802 Use the Date to find a next page in RSM, not the id
This way, it works, whatever the order of insertion in the database was.

fix #3343
2018-04-14 19:48:45 +02:00
louiz’ d375a9edeb one log_debug -> log_error, also some trivial indent 2018-04-13 23:37:46 +02:00
louiz’ 857c7d3972 Use a different Date data type
PLEASE backup your database before testing this commit, and report any
migration issue.

In postgresql, we use timestamp with timezone.
In sqlite3 we use REAL (the date is expressed as julianday)

This requires a migration of the muclogline_ table:
In postgresql it’s pretty simple, we convert all the integer into timestamps

With sqlite3, we actually rename the table, create the new one with the
correct type, then copy everything to the new table, with a conversion
function for the Date_ column, and then we delete the old table.

fix #3343
2018-04-11 00:25:18 +02:00
Georg Lukas 49bb383080 Channel disco-info: use shorter string 2018-03-26 22:27:45 +02:00
louiz’ d81a9456ac Change the nick of the joining user AFTER sending all the join stuff
fix #3305
2018-03-23 21:18:52 +01:00
louiz’ e2fc3cf68e Properly handle force-join presences by sending everything in return
fix #3305
2018-03-23 16:16:30 +01:00
louiz’ 0de282a177 Advertise the muc#stable_id feature on disco#info results
From XEP 0045:
“Note: the requirement to reflect the 'id' attribute was added in version
1.31 of this XEP. Servers following the new specification SHOULD advertise
that with a disco info feature of 'http://jabber.org/protocol/muc#stable_id'
on both the service domain and on individual MUCs, so that clients can check
for support.”
2018-03-18 19:37:41 +01:00
louiz’ 9500bfd4cc Reflect message IDs in channel MUCs
fix #3283
2018-03-18 19:33:07 +01:00
louiz’ 158d743bf5 Remove the virtual channel feature altogether 2018-03-12 00:13:59 +01:00
louiz’ 4a2a280d76 Support the <before/> element in MAM requests 2018-02-13 03:51:03 +01:00
louiz’ 50d3c4a0b2 Do not forget an early return, to return the correct item-not-found error 2018-02-13 03:39:13 +01:00
louiz’ d705541435 Send a item-not-found error when the “after” value is not in the archive 2018-02-11 23:29:58 +01:00
louiz’ 0280343ced Handle the “after” RSM value to page through results 2018-02-10 19:51:59 +01:00
louiz’ 99389eefba Always return the oldest matching messages from MAM, even if no date is set 2018-02-10 17:47:42 +01:00
louiz’ 369da19d41 Remove the debug logs from previous commit 2018-01-30 09:16:12 +01:00
louiz’ cb83178894 Add the complete='true' attribute only when appropriate 2018-01-30 09:07:21 +01:00
louiz’ 17f2cb5c93 Do not forget the complete='true' attribute in MAM’s result iq 2018-01-29 21:11:20 +01:00
louiz’ f371d9ca46 xep-0106 escape the JIDs listed in a disco#items server query
fix #3325
2018-01-18 19:34:56 +01:00
louiz’ 8409e50c1a Fix a subtle iid parsing error in the adhoc code 2017-12-27 19:36:36 +01:00
louiz’ 2d9f516d1d Don’t answer to some requests towards MUC participants
These requests are only meant to be received by the room itself. The
participant must answer with not-implemented instead.

fix #3323
2017-12-27 19:23:28 +01:00
louiz’ 131ef9946f Include the <fin><set><first/><last/></></> nodes in the MAM iq result
fix #3322
2017-12-26 20:21:18 +01:00
louiz’ 24dc05dd97 Run some of the ci tests against a postgresql docker container 2017-12-03 16:46:14 +01:00