1
0
Эх сурвалжийг харах

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

poesty 3 жил өмнө
parent
commit
56c44eb455
1 өөрчлөгдсөн 5 нэмэгдсэн , 0 устгасан
  1. 5 0
      mastoapi.c

+ 5 - 0
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;