diff options
author | Michael Vetter <jubalh@iodoru.org> | 2021-06-09 16:19:45 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-09 16:19:45 +0200 |
commit | 343d970e3da319afe4109ad1c9d664ffe09dedfa (patch) | |
tree | 4bdebbc7cd297460d76603667b90a5993b7ad46b /src/xmpp | |
parent | d7adec69cefedce8949ead1309e9a8e56a8c4d8f (diff) | |
parent | 8ef35290bdde58c6a0e7231c1870152f946d78e0 (diff) | |
download | profani-tty-343d970e3da319afe4109ad1c9d664ffe09dedfa.tar.gz |
Merge pull request #1559 from profanity-im/feature/1558-bookmark
Add command to show single bookmark details
Diffstat (limited to 'src/xmpp')
-rw-r--r-- | src/xmpp/bookmark.c | 7 | ||||
-rw-r--r-- | src/xmpp/xmpp.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/xmpp/bookmark.c b/src/xmpp/bookmark.c index 65c3bd01..4e40e3ec 100644 --- a/src/xmpp/bookmark.c +++ b/src/xmpp/bookmark.c @@ -225,6 +225,13 @@ bookmark_remove(const char* jid) return TRUE; } +Bookmark* +bookmark_get_by_jid(const char* jid) +{ + Bookmark* bookmark = g_hash_table_lookup(bookmarks, jid); + return bookmark; +} + GList* bookmark_get_list(void) { diff --git a/src/xmpp/xmpp.h b/src/xmpp/xmpp.h index 4229ddae..003c3e07 100644 --- a/src/xmpp/xmpp.h +++ b/src/xmpp/xmpp.h @@ -274,6 +274,7 @@ gboolean bookmark_update(const char* jid, const char* nick, const char* password gboolean bookmark_remove(const char* jid); gboolean bookmark_join(const char* jid); GList* bookmark_get_list(void); +Bookmark* bookmark_get_by_jid(const char* jid); char* bookmark_find(const char* const search_str, gboolean previous, void* context); void bookmark_autocomplete_reset(void); gboolean bookmark_exists(const char* const room); |