Browse Source

mastoapi: fixed muted words not being filtered.

grunfink 1 tuần trước cách đây
mục cha
commit
b3bf64ee19
1 tập tin đã thay đổi với 5 bổ sung0 xóa
  1. 5 0
      mastoapi.c

+ 5 - 0
mastoapi.c

@@ -1707,6 +1707,11 @@ xs_list *mastoapi_timeline(snac *user, const xs_dict *args, const char *index_fn
                 /* discard hidden notes */
                 /* discard hidden notes */
                 if (is_hidden(user, id))
                 if (is_hidden(user, id))
                     continue;
                     continue;
+
+                /* muted words? */
+                if (words_in_content(xs_dict_get(user->config, "muted_words"),
+                                     xs_dict_get(msg, "content")))
+                    continue;
             }
             }
             else {
             else {
                 /* skip non-public messages */
                 /* skip non-public messages */