diff options
author | Marius Halden <marius.h@lden.org> | 2018-04-19 10:23:08 +0200 |
---|---|---|
committer | Marius Halden <marius.h@lden.org> | 2018-04-19 10:23:08 +0200 |
commit | db02ac8971379f9fee2f3a618bb08b8076d1a83d (patch) | |
tree | 0e7d46bad6162509300aa73ae6d77e571a5b26d0 /protocols/jabber | |
parent | 6dc54671e368d03ed447d0fbd2d662af6c36b7fd (diff) | |
parent | 246b98bbdf221448fd7a638fea04373ed1612de5 (diff) |
Merge branch 'master' into patched-master
Diffstat (limited to 'protocols/jabber')
-rw-r--r-- | protocols/jabber/jabber.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/protocols/jabber/jabber.c b/protocols/jabber/jabber.c index 73bc77ea..4b24bf60 100644 --- a/protocols/jabber/jabber.c +++ b/protocols/jabber/jabber.c @@ -584,9 +584,14 @@ static struct groupchat *jabber_chat_join_(struct im_connection *ic, const char if (strchr(room, '@') == NULL) { imcb_error(ic, "%s is not a valid Jabber room name. Maybe you mean %s@conference.%s?", room, room, jd->server); - } else if (jabber_chat_by_jid(ic, room)) { - imcb_error(ic, "Already present in chat `%s'", room); } else { + struct groupchat *old; + + if ((old = jabber_chat_by_jid(ic, room))) { + imcb_log(ic, "Warning: Already present in chat `%s' - trying to join anyway", room); + jabber_chat_free(old); + } + /* jabber_chat_join without the underscore is the conference.c one */ return jabber_chat_join(ic, room, final_nick, set_getstr(sets, "password"), set_getbool(sets, "always_use_nicks")); |