diff options
author | Jonathon Jongsma <jonathon.jongsma@collabora.co.uk> | 2009-01-27 17:24:59 -0600 |
---|---|---|
committer | Jonathon Jongsma <jonathon.jongsma@collabora.co.uk> | 2009-02-13 16:32:29 -0600 |
commit | a88b5955d95ba5ed1fa7cd23b574883c5a017543 (patch) | |
tree | 4e0d5cd4bf8682a0722d7af3c7ba395966349294 /src/idle-handles.c | |
parent | 919ee9b1448430737f89056209280947ec5ade72 (diff) | |
download | telepathy-idle-a88b5955d95ba5ed1fa7cd23b574883c5a017543.tar.gz |
Fix Bug #19766: private messages no longer delivered to group chat
This could perhaps be a slightly controversial change. The reason that the bug
happened was that telepathy-idle's room handle repository normalizer function
had some special code to make joining chatrooms more user-friendly. Basically,
if the user specified a chatroom 'foo', it would assume you meant '#foo' and
automatically prepend the '#' character.
The way the parser currently works is that when we get in a privmsg, we try to
parse the 'destination' of the privmsg as both a contact and a room. The way we
determine if it's a valid room or not is by calling tp_handle_ensure(room_repo,
...) (and same for determining valid contacts). Unfortunately, because of the
automatic #-prepending this means that a single privmsg destination can be both
a valid contact and a valid channel name, so if the user is in a channel with
the same name as their nick (but without the leading #), the privmsg will be
handled by both the IMFactory and the MUCFactory
Diffstat (limited to 'src/idle-handles.c')
-rw-r--r-- | src/idle-handles.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/src/idle-handles.c b/src/idle-handles.c index 2dd9ea3..d89b32a 100644 --- a/src/idle-handles.c +++ b/src/idle-handles.c @@ -121,12 +121,6 @@ static gchar *_nick_normalize_func(TpHandleRepoIface *repo, const gchar *id, gpo static gchar *_channel_normalize_func(TpHandleRepoIface *repo, const gchar *id, gpointer ctx, GError **error) { gchar *channel = g_strdup(id); - if ((channel[0] != '#') && (channel[0] != '!') && (channel[0] != '&') && (channel[0] != '+')) { - gchar *tmp = channel; - channel = g_strdup_printf("#%s", channel); - g_free(tmp); - } - if (!_channelname_is_valid(channel)) { g_set_error(error, TP_ERRORS, TP_ERROR_INVALID_HANDLE, "invalid channel ID"); return NULL; |