commit 203db3b

default  ·  2024-12-04 04:51:17 +0000 UTC
parent 22d05cd
Fixed bug in blocked instance rejection.
3 files changed,  +7, -1
M html.c
M snac.h
M html.c
+3, -0
 1@@ -1524,6 +1524,9 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
 2     if ((read_only || !user) && !is_msg_public(msg))
 3         return NULL;
 4 
 5+    if (is_instance_blocked(id))
 6+        return NULL;
 7+
 8     if (user && level == 0 && xs_is_true(xs_dict_get(user->config, "collapse_threads")))
 9         collapse_threads = 1;
10 
+3, -0
 1@@ -1349,6 +1349,9 @@ xs_list *mastoapi_timeline(snac *user, const xs_dict *args, const char *index_fn
 2             if (!xs_match(type, POSTLIKE_OBJECT_TYPE))
 3                 continue;
 4 
 5+            if (is_instance_blocked(id))
 6+                continue;
 7+
 8             const char *from = NULL;
 9             if (strcmp(type, "Page") == 0)
10                 from = xs_dict_get(msg, "audience");
M snac.h
+1, -1
1@@ -1,7 +1,7 @@
2 /* snac - A simple, minimalistic ActivityPub instance */
3 /* copyright (c) 2022 - 2024 grunfink et al. / MIT license */
4 
5-#define VERSION "2.65"
6+#define VERSION "2.66-dev"
7 
8 #define USER_AGENT "snac/" VERSION
9