mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Use account muc_nick when no nick for bookmark
This commit is contained in:
parent
ff37b44a62
commit
b85fd5e78c
@ -326,8 +326,10 @@ _bookmark_handle_result(xmpp_conn_t * const conn,
|
|||||||
|
|
||||||
++autojoin_count;
|
++autojoin_count;
|
||||||
|
|
||||||
|
char *account_name = jabber_get_account_name();
|
||||||
|
ProfAccount *account = accounts_get_account(account_name);
|
||||||
if (name == NULL) {
|
if (name == NULL) {
|
||||||
name = my_jid->localpart;
|
name = account->muc_nick;
|
||||||
}
|
}
|
||||||
|
|
||||||
log_debug("Autojoin %s with nick=%s", jid, name);
|
log_debug("Autojoin %s with nick=%s", jid, name);
|
||||||
@ -337,6 +339,7 @@ _bookmark_handle_result(xmpp_conn_t * const conn,
|
|||||||
muc_join_room(jid, name, password, TRUE);
|
muc_join_room(jid, name, password, TRUE);
|
||||||
}
|
}
|
||||||
jid_destroy(room_jid);
|
jid_destroy(room_jid);
|
||||||
|
account_free(account);
|
||||||
} else {
|
} else {
|
||||||
log_debug("Rejected autojoin %s (maximum has been reached)", jid);
|
log_debug("Rejected autojoin %s (maximum has been reached)", jid);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user