Skip to content

Commit

Permalink
jabber: try to join anyway after "Already present in chat"
Browse files Browse the repository at this point in the history
Most of the time that error meant a confusion on bitlbee's side, often a
server for which we sent a join request and never got a reply for.
  • Loading branch information
dequis committed Mar 31, 2018
1 parent a39ede7 commit 246b98b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions protocols/jabber/jabber.c
Expand Up @@ -578,9 +578,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"));
Expand Down

0 comments on commit 246b98b

Please sign in to comment.