Commit Graph
196 Commits
Author SHA1 Message Date
Luca Matei Pintilie 7bc27b21e6 fix tests 2025-11-28 20:30:12 +01:00
Benjamin Graillot d13f66ab90 Add support for IRCv3 message-tags Implement draft/multiline 2025-11-28 20:30:12 +01:00
Luca Matei Pintilie 979ba96cb0 Update to ergo 2.15+ 2025-10-12 18:01:47 +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
Luca Matei Pintilie 8c4769e27b Revert "Replace a useless shared_ptr by a unique_ptr"
This reverts commit 248e25c22f.

In preparation for the botan 3 update `IrcClient` must be made into a
`shared_ptr`, which will then allow us to pass a `shared_ptr` of
callbacks to `Botan::TLS::Client`
2025-07-29 15:52:16 +02: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
Georg Lukas 9a90c76eba Do not mark message to bare JID private/no-copy 2020-09-23 23:20:47 +02:00
Jonas Schäfer f8da92a8be Always send direct messages to the user’s bare JID
This has the following advantages:

- Works while all resources are offline (persistent channels)
- Helps with combating duplicate messages when sent to different
  resources, resources going offline, carbon-copying etc. etc.

As a side effect, this also makes the MUC PMs not be MUC PMs and
always be emitted from the server-wide JID of the sending user.

Fixes #3313.
2020-09-23 23:20:47 +02:00
louiz’ 212e8e5989 Merge remote-tracking branch 'linkmauve/die-gc1.0-die' 2020-03-11 18:41:43 +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’ 76b81cec55 Small trivial readability improvement 2020-03-02 23:20:47 +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’ f1936fdd08 Actually fix that correctly instead of the opposite 2019-09-09 22:04:54 +02:00
louiz’ 8a6d053be9 Remove trailing / of fulljids if IRC host is missing 2019-09-09 12:27:27 +02:00
louiz’ 224eb9223f Properly re-convert \01ACTION into a /me when reflected to the sender
fix #3382

It still needs to be fixed properly by cleaning the way we send the messages
in all direction etc. And this is ugly because, with just one message, we do
a conversion in one direction, and then re-convert in the other
direction. But at least it works and users will be happy, even if I’m not
entirely satisfied with the code.
2019-08-25 21:58:07 +02:00
Jonas Schäfer a8ce138dd2 XEP-0410: set not-in-the-room error condition to not-acceptable
XEP-0410 demands that. This changes the error condition for all
pings to the room, even those which aren’t self-pings, if the
sender is not joined.

The conditions of XEP-0410 were based on observing existing
implementations.
2019-08-20 21:42:43 +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
Jonas Schäfer 3621458d3f Do not send the IRC host directly as real JID of the user
Fixes #3381
2018-10-04 20:16:17 +02:00
louiz’ b9f6fbd840 Remove an unused function (and a useless debug log) 2018-08-26 18:08:14 +02:00
louiz’ 478619b10a Trivial little syntax changes 2018-08-26 15:42:38 +02:00
louiz’ 248e25c22f Replace a useless shared_ptr by a unique_ptr 2018-08-26 15:41:54 +02:00
louiz’ 0b51e38281 MaxHistoryLength now has some sensible default value if the user set a negative one 2018-08-23 20:30:11 +02:00
louiz’ 782732ba16 Remove a bunch of useless empty lines 2018-08-04 14:50:33 +02:00
louiz’ 7a4cea426d Reflect messages to XMPP only when they are actually sent 2018-07-24 23:16:14 +02:00
louiz’ 7f8a612c98 Fix a warning (unused variable) in some build config 2018-06-25 22:57:23 +02:00
louiz’ 52166e07ac Trivial syntax improvements 2018-06-25 22:57:13 +02:00
louiz’ 0b8738d87a Archive the Mode messages, except if they are received for an unjoined chan
fix #3362
2018-06-22 21:35:46 +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 39a32d5524 Use jid.bare() instead of manual concatenation 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’ 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
louiz’ 0cd848e532 Send the stanza-id for messages received by other users
fix #3347
2018-03-31 02:10:39 +02:00
louiz’ e2fc3cf68e Properly handle force-join presences by sending everything in return
fix #3305
2018-03-23 16:16:30 +01:00
louiz’ faa33c1a71 Pass an IrcClient* to send_muc_leave instead of doing an other search 2018-03-22 20:44:30 +01:00
louiz’ 619c991a69 Add a nick field in the IRC server configuration form
fix #3317
2018-03-19 20:15:44 +01:00
louiz’ 1320dc6db4 Don’t reflect an empty id if it was not included
Instead, generate a uuid for that message
2018-03-18 19:41:52 +01:00
louiz’ 9500bfd4cc Reflect message IDs in channel MUCs
fix #3283
2018-03-18 19:33:07 +01:00
louiz’ bb596582bd Add a <item/> node in the presence of a leaving participant
fix #3339
2018-03-12 00:13:59 +01:00
louiz’ 158d743bf5 Remove the virtual channel feature altogether 2018-03-12 00:13:59 +01:00
louiz’ fd7c365288 Use the same function for both history orders 2018-02-13 03:10:00 +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’ 37340e593f Add a <x muc#user> node on outgoing private MUC messages
See https://xmpp.org/extensions/xep-0045.html#privatemessage

fix #3321
2017-12-26 19:52:41 +01:00
louiz’ 24dc05dd97 Run some of the ci tests against a postgresql docker container 2017-12-03 16:46:14 +01:00
louiz’ 90dd8e8b42 Fix #3304 2017-11-07 23:18:30 +01:00
louiz’ cb6b50dc01 Change how we count the number of connected resources to a server 2017-11-07 23:05:05 +01:00
louiz’ bfcf294517 Add the persistent_by_default configuration option
fix #3293
2017-09-09 17:09:17 +02:00
louiz’ dabc48b79b Mark messages from the IRC server as private and no-copy
fix #3284
2017-08-30 16:14:35 +02:00
louiz’ fcaffb9e77 Add support for the "history" node on MUC join
Supports the "seconds", "maxstanzas", "since" and "maxchars" (but only =0)
attributes.

fix #3270
2017-08-27 22:37:46 +02:00