Option to bookmark room invites

issue #813
This commit is contained in:
James Booth
2016-05-23 23:53:44 +01:00
parent 0edd430925
commit 6559263b2f
10 changed files with 68 additions and 4 deletions

View File

@@ -240,6 +240,24 @@ bookmark_autocomplete_reset(void)
}
}
gboolean
bookmark_exists(const char *const room)
{
GSList *bookmarks = autocomplete_create_list(bookmark_ac);
GSList *curr = bookmarks;
while (curr) {
if (strcmp(curr->data, room) == 0) {
g_slist_free_full(bookmarks, g_free);
return TRUE;
} else {
curr = g_slist_next(curr);
}
}
g_slist_free_full(bookmarks, g_free);
return FALSE;
}
static int
_bookmark_result_id_handler(xmpp_stanza_t *const stanza, void *const userdata)
{