diff options
author | Daniel Landau <daniel@landau.fi> | 2016-11-09 00:09:17 +0200 |
---|---|---|
committer | Alexander Akulich <akulichalexander@gmail.com> | 2020-11-01 01:53:10 +0300 |
commit | c1ae3d2bdc7801cdf60adb6a5cdb6390a0749014 (patch) | |
tree | 5d808d0fe98854f2cc3495a6b7bcf840e6b272f6 | |
parent | 07d021e5e1c11e9ecda0907038bb7a6fa7f18c58 (diff) | |
download | telepathy-idle-c1ae3d2bdc7801cdf60adb6a5cdb6390a0749014.tar.gz |
Channel names can start with a '!'
According to RFC2811 (https://tools.ietf.org/html/rfc2811#section-3.2)
channel names can start with a bang. Without this check the initial bang
gets stripped out and Telepathy tries to ensure as a channel without the
prefix. That obviously fails, leading to the messages from that channel
arriving as "private" messages.
-rw-r--r-- | src/idle-parser.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/idle-parser.c b/src/idle-parser.c index 71ca8b1..2d0ec17 100644 --- a/src/idle-parser.c +++ b/src/idle-parser.c @@ -518,7 +518,9 @@ static gboolean _parse_atom(IdleParser *parser, GValueArray *arr, char atom, con gchar *id, *bang = NULL; gchar modechar = '\0'; - if (idle_muc_channel_is_modechar(token[0])) { + /* Channel names can start with a '!', so don't strip that + * (https://tools.ietf.org/html/rfc2811#section-3.2) */ + if (atom != 'r' && idle_muc_channel_is_modechar(token[0])) { modechar = token[0]; token++; } |