diff options
Diffstat (limited to 'src/xmpp/bookmark.c')
-rw-r--r-- | src/xmpp/bookmark.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/xmpp/bookmark.c b/src/xmpp/bookmark.c index b4931b8f..b5d495a6 100644 --- a/src/xmpp/bookmark.c +++ b/src/xmpp/bookmark.c @@ -77,9 +77,7 @@ bookmark_request(void) id = strdup("bookmark_init_request"); autojoin_count = 0; - if (bookmark_ac != NULL) { - autocomplete_free(bookmark_ac); - } + autocomplete_free(bookmark_ac); bookmark_ac = autocomplete_new(); if (bookmark_list != NULL) { g_list_free_full(bookmark_list, _bookmark_item_destroy); @@ -180,15 +178,15 @@ _bookmark_join(const char *jid) char *account_name = jabber_get_account_name(); ProfAccount *account = accounts_get_account(account_name); Bookmark *item = found->data; - if (!muc_room_is_active(item->jid)) { + if (!muc_active(item->jid)) { char *nick = item->nick; if (nick == NULL) { nick = account->muc_nick; } presence_join_room(item->jid, nick, item->password); - muc_join_room(item->jid, nick, item->password, FALSE); + muc_join(item->jid, nick, item->password, FALSE); account_free(account); - } else if (muc_get_roster_received(item->jid)) { + } else if (muc_roster_complete(item->jid)) { ui_room_join(item->jid, TRUE); } return TRUE; @@ -345,9 +343,9 @@ _bookmark_handle_result(xmpp_conn_t * const conn, log_debug("Autojoin %s with nick=%s", jid, name); room_jid = jid_create_from_bare_and_resource(jid, name); - if (!muc_room_is_active(room_jid->barejid)) { + if (!muc_active(room_jid->barejid)) { presence_join_room(jid, name, password); - muc_join_room(jid, name, password, TRUE); + muc_join(jid, name, password, TRUE); } jid_destroy(room_jid); account_free(account); |