summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar default2024-12-04 05:51:17 +0100
committerGravatar default2024-12-04 05:51:17 +0100
commit203db3b09e3ebf8677f75e83e5470b99c74de470 (patch)
tree661c07f5529eb563f7d3e7775a10a5b0973476c9
parentVersion 2.65 RELEASED. (diff)
downloadpenes-snac2-203db3b09e3ebf8677f75e83e5470b99c74de470.tar.gz
penes-snac2-203db3b09e3ebf8677f75e83e5470b99c74de470.tar.xz
penes-snac2-203db3b09e3ebf8677f75e83e5470b99c74de470.zip
Fixed bug in blocked instance rejection.
-rw-r--r--html.c3
-rw-r--r--mastoapi.c3
-rw-r--r--snac.h2
3 files changed, 7 insertions, 1 deletions
diff --git a/html.c b/html.c
index f8fb876..26831f5 100644
--- a/html.c
+++ b/html.c
@@ -1524,6 +1524,9 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
1524 if ((read_only || !user) && !is_msg_public(msg)) 1524 if ((read_only || !user) && !is_msg_public(msg))
1525 return NULL; 1525 return NULL;
1526 1526
1527 if (is_instance_blocked(id))
1528 return NULL;
1529
1527 if (user && level == 0 && xs_is_true(xs_dict_get(user->config, "collapse_threads"))) 1530 if (user && level == 0 && xs_is_true(xs_dict_get(user->config, "collapse_threads")))
1528 collapse_threads = 1; 1531 collapse_threads = 1;
1529 1532
diff --git a/mastoapi.c b/mastoapi.c
index a529990..0332629 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -1349,6 +1349,9 @@ xs_list *mastoapi_timeline(snac *user, const xs_dict *args, const char *index_fn
1349 if (!xs_match(type, POSTLIKE_OBJECT_TYPE)) 1349 if (!xs_match(type, POSTLIKE_OBJECT_TYPE))
1350 continue; 1350 continue;
1351 1351
1352 if (is_instance_blocked(id))
1353 continue;
1354
1352 const char *from = NULL; 1355 const char *from = NULL;
1353 if (strcmp(type, "Page") == 0) 1356 if (strcmp(type, "Page") == 0)
1354 from = xs_dict_get(msg, "audience"); 1357 from = xs_dict_get(msg, "audience");
diff --git a/snac.h b/snac.h
index 3f4fb81..a3c055b 100644
--- a/snac.h
+++ b/snac.h
@@ -1,7 +1,7 @@
1/* snac - A simple, minimalistic ActivityPub instance */ 1/* snac - A simple, minimalistic ActivityPub instance */
2/* copyright (c) 2022 - 2024 grunfink et al. / MIT license */ 2/* copyright (c) 2022 - 2024 grunfink et al. / MIT license */
3 3
4#define VERSION "2.65" 4#define VERSION "2.66-dev"
5 5
6#define USER_AGENT "snac/" VERSION 6#define USER_AGENT "snac/" VERSION
7 7