Entirely remove the code for the “preferred_from” nick
Since private messages are now always coming from the server-wide JIDs
Do not mark message to bare JID private/no-copy
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.
Merge remote-tracking branch 'linkmauve/die-gc1.0-die'
Small trivial readability improvement
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.
Actually fix that correctly instead of the opposite
Remove trailing / of fulljids if IRC host is missing
Properly re-convert \01ACTION into a /me when reflected to the sender
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.
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
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.
Do not send the IRC host directly as real JID of the user
Remove an unused function (and a useless debug log)
Trivial little syntax changes
Replace a useless shared_ptr by a unique_ptr
MaxHistoryLength now has some sensible default value if the user set a negative one
Remove a bunch of useless empty lines
Reflect messages to XMPP only when they are actually sent