mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-12-26 17:23:38 +00:00
Fixed bug in blocked instance rejection.
This commit is contained in:
parent
22d05cded1
commit
203db3b09e
3 changed files with 7 additions and 1 deletions
3
html.c
3
html.c
|
@ -1524,6 +1524,9 @@ xs_html *html_entry(snac *user, xs_dict *msg, int read_only,
|
||||||
if ((read_only || !user) && !is_msg_public(msg))
|
if ((read_only || !user) && !is_msg_public(msg))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
if (is_instance_blocked(id))
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if (user && level == 0 && xs_is_true(xs_dict_get(user->config, "collapse_threads")))
|
if (user && level == 0 && xs_is_true(xs_dict_get(user->config, "collapse_threads")))
|
||||||
collapse_threads = 1;
|
collapse_threads = 1;
|
||||||
|
|
||||||
|
|
|
@ -1349,6 +1349,9 @@ xs_list *mastoapi_timeline(snac *user, const xs_dict *args, const char *index_fn
|
||||||
if (!xs_match(type, POSTLIKE_OBJECT_TYPE))
|
if (!xs_match(type, POSTLIKE_OBJECT_TYPE))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
if (is_instance_blocked(id))
|
||||||
|
continue;
|
||||||
|
|
||||||
const char *from = NULL;
|
const char *from = NULL;
|
||||||
if (strcmp(type, "Page") == 0)
|
if (strcmp(type, "Page") == 0)
|
||||||
from = xs_dict_get(msg, "audience");
|
from = xs_dict_get(msg, "audience");
|
||||||
|
|
2
snac.h
2
snac.h
|
@ -1,7 +1,7 @@
|
||||||
/* snac - A simple, minimalistic ActivityPub instance */
|
/* snac - A simple, minimalistic ActivityPub instance */
|
||||||
/* copyright (c) 2022 - 2024 grunfink et al. / MIT license */
|
/* copyright (c) 2022 - 2024 grunfink et al. / MIT license */
|
||||||
|
|
||||||
#define VERSION "2.65"
|
#define VERSION "2.66-dev"
|
||||||
|
|
||||||
#define USER_AGENT "snac/" VERSION
|
#define USER_AGENT "snac/" VERSION
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue