commit 18976dc

default  ·  2023-08-09 12:43:27 +0000 UTC
parent cdb201c
Revert "Implemented hide_followers_only."

Posts from groups give false positives from hide_followers_only,
so the full idea is discarded.

This reverts commit b3797d24162bd2c8637d267ae0a08f3cd6e45dff.
1 files changed,  +1, -16
M html.c
M html.c
+1, -16
 1@@ -843,10 +843,9 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local,
 2     int sensitive = 0;
 3     char *v;
 4     xs *boosts = NULL;
 5-    int is_public = is_msg_public(snac, msg);
 6 
 7     /* do not show non-public messages in the public timeline */
 8-    if (local && !is_public)
 9+    if (local && !is_msg_public(snac, msg))
10         return os;
11 
12     /* hidden? do nothing more for this conversation */
13@@ -857,20 +856,6 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local,
14     if (level >= 256)
15         return os;
16 
17-    if (xs_type(xs_dict_get(snac->config, "hide_followers_only")) == XSTYPE_TRUE) {
18-        /* test if this is a non-public message not explicitly for this user */
19-        if (!is_public) {
20-            const char *to = xs_dict_get(msg, "to");
21-            const char *cc = xs_dict_get(msg, "cc");
22-
23-            if ((xs_is_null(to) || xs_list_in(to, snac->actor) == -1) &&
24-                (xs_is_null(cc) || xs_list_in(cc, snac->actor) == -1)) {
25-                snac_debug(snac, 0, xs_fmt("hidden message %s for followers only (%s)", id, md5));
26-                return os;
27-            }
28-        }
29-    }
30-
31     xs *s = xs_str_new("<div>\n");
32 
33     {