Add support for self messages
authorShane Synan <digitalcircuit36939@gmail.com>
Sat, 27 Aug 2016 22:28:36 +0000 (17:28 -0500)
committerManuel Nickschas <sputnick@quassel-irc.org>
Mon, 5 Sep 2016 17:30:41 +0000 (19:30 +0200)
Check if the incoming message sender is our own nick.  If so, treat
as if sent by the core itself.  Message decryption is still tried in
case the user manually set up identical keys on different clients,
but key negotiation isn't allowed with self-messages (for it wouldn't
make sense).

Carry over the "Self" flag from EventManager to Message, so incoming
self-messages can be processed and stored as if sent by the client.

This lays some of the groundwork for IRCv3 'echo-message'.

For example, if the core's nick is 'quasseluser':
  :quasseluser!ex@example.com PRIVMSG dcircuit :hi

...is handled as if 'quasseluser' had sent 'hi' to nick 'dcircuit'.

See http://ircv3.net/specs/extensions/echo-message-3.2.html


No differences found