about summary refs log tree commit diff stats
path: root/src/tools
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-05-24 17:17:20 +0200
committerMichael Vetter <jubalh@iodoru.org>2020-05-24 17:55:08 +0200
commitf121554088a6bffd2721b94c46a40d8ec61e0b46 (patch)
tree3f641f76d7c35dedb6930cd56023056335b12f9c /src/tools
parentca3972b3ca85a8ba50da46e679832dcedfadcce7 (diff)
downloadprofani-tty-f121554088a6bffd2721b94c46a40d8ec61e0b46.tar.gz
List ignored bookmarks
`/bookmarl ignore` lists the ignored bookmarks.

Regards https://github.com/profanity-im/profanity/issues/1115
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/bookmark_ignore.c6
-rw-r--r--src/tools/bookmark_ignore.h1
2 files changed, 7 insertions, 0 deletions
diff --git a/src/tools/bookmark_ignore.c b/src/tools/bookmark_ignore.c
index 3a3d0787..018c5b5b 100644
--- a/src/tools/bookmark_ignore.c
+++ b/src/tools/bookmark_ignore.c
@@ -85,3 +85,9 @@ bookmark_ignored(Bookmark *bookmark)
 {
     return g_key_file_get_boolean(bookmark_ignore_keyfile, account_jid, bookmark->barejid, NULL);
 }
+
+gchar **
+bookmark_ignore_list(gsize *len)
+{
+    return g_key_file_get_keys(bookmark_ignore_keyfile, account_jid, len, NULL);
+}
diff --git a/src/tools/bookmark_ignore.h b/src/tools/bookmark_ignore.h
index 62c0458a..3eb0ccff 100644
--- a/src/tools/bookmark_ignore.h
+++ b/src/tools/bookmark_ignore.h
@@ -39,5 +39,6 @@
 void bookmark_ignore_on_connect();
 void bookmark_ignore_on_disconnect();
 gboolean bookmark_ignored(Bookmark *bookmark);
+gchar ** bookmark_ignore_list(gsize *len);
 
 #endif