mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
Bookmarks: Move stanza pointer on in loop, check for autojoin "true"
This commit is contained in:
parent
5cb136225e
commit
7906bd6a9d
@ -144,11 +144,13 @@ _bookmark_handle_result(xmpp_conn_t * const conn,
|
||||
ptr = xmpp_stanza_get_children(ptr);
|
||||
while (ptr) {
|
||||
name = xmpp_stanza_get_name(ptr);
|
||||
if (strcmp(name, STANZA_NAME_CONFERENCE) != 0) {
|
||||
if (!name || strcmp(name, STANZA_NAME_CONFERENCE) != 0) {
|
||||
ptr = xmpp_stanza_get_next(ptr);
|
||||
continue;
|
||||
}
|
||||
jid = xmpp_stanza_get_attribute(ptr, STANZA_ATTR_JID);
|
||||
if (!jid) {
|
||||
ptr = xmpp_stanza_get_next(ptr);
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -166,7 +168,7 @@ _bookmark_handle_result(xmpp_conn_t * const conn,
|
||||
}
|
||||
|
||||
autojoin = xmpp_stanza_get_attribute(ptr, "autojoin");
|
||||
if (autojoin && strcmp(autojoin, "1") == 0) {
|
||||
if (autojoin && (strcmp(autojoin, "1") == 0 || strcmp(autojoin, "true") == 0)) {
|
||||
autojoin_val = TRUE;
|
||||
} else {
|
||||
autojoin_val = FALSE;
|
||||
|
Loading…
Reference in New Issue
Block a user