1
0
mirror of https://github.com/profanity-im/profanity.git synced 2024-09-22 19:45:54 -04:00

Don't show error for initial bookmarks request

This commit is contained in:
James Booth 2014-01-25 17:18:30 +00:00
parent 4bd06a5d87
commit aada6d5cd6
2 changed files with 12 additions and 6 deletions

View File

@ -37,10 +37,7 @@ bookmark_request(void)
xmpp_ctx_t *ctx = connection_get_ctx();
xmpp_stanza_t *iq;
id = get_unique_id();
if (!id) {
return;
}
id = strdup("bookmark_init_request");
autojoin_count = 0;
if (bookmark_ac != NULL) {

View File

@ -345,8 +345,17 @@ connection_error_handler(xmpp_conn_t * const conn, xmpp_stanza_t * const stanza,
gchar *err_msg = NULL;
gchar *from = xmpp_stanza_get_attribute(stanza, STANZA_ATTR_FROM);
xmpp_stanza_t *error_stanza = xmpp_stanza_get_child_by_name(stanza, STANZA_NAME_ERROR);
xmpp_stanza_t *text_stanza =
xmpp_stanza_get_child_by_name(error_stanza, STANZA_NAME_TEXT);
xmpp_stanza_t *text_stanza = xmpp_stanza_get_child_by_name(error_stanza, STANZA_NAME_TEXT);
// handle specific errors by ID
char *id = xmpp_stanza_get_id(stanza);
if (id != NULL) {
// ignore if server doesn't support bookmarks
if (strcmp("bookmark_init_request", id) == 0) {
return 1;
}
}
if (error_stanza == NULL) {
log_debug("error message without <error/> received");