snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit 56c44eb455b94fb7229d04cec1d3229b3808d3d8
parent 86198549e77cfb6a862d9f96b4f035bd6d73c773
Author: poesty <poesty7450@gmail.com>
Date:   Sat, 10 Jun 2023 14:07:58 +0800

Ignore non-followed users' notes without boosts in private timeline

Diffstat:
Mmastoapi.c | 5+++++
1 file changed, 5 insertions(+), 0 deletions(-)

diff --git a/mastoapi.c b/mastoapi.c @@ -1200,6 +1200,11 @@ int mastoapi_get_handler(const xs_dict *req, const char *q_path, if (strcmp(type, "Note") != 0 && strcmp(type, "Question") != 0) continue; + /* discard notes from people we don't follow with no boosts */ + if (!following_check(&snac1, xs_dict_get(msg, "attributedTo")) && + object_announces_len(xs_dict_get(msg, "id")) == 0) + continue; + /* discard notes from muted morons */ if (is_muted(&snac1, xs_dict_get(msg, "attributedTo"))) continue;