diff options
| author | 2023-08-09 14:43:27 +0200 | |
|---|---|---|
| committer | 2023-08-09 14:43:27 +0200 | |
| commit | 18976dc6b8c1ee65056444fa6ac8b11541caa5dd (patch) | |
| tree | fb032c24cef0b1ad6c5c41651fff2be6f203fe92 /html.c | |
| parent | Revert "Added web interface for hide_followers_only." (diff) | |
| download | snac2-18976dc6b8c1ee65056444fa6ac8b11541caa5dd.tar.gz snac2-18976dc6b8c1ee65056444fa6ac8b11541caa5dd.tar.xz snac2-18976dc6b8c1ee65056444fa6ac8b11541caa5dd.zip | |
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.
Diffstat (limited to 'html.c')
| -rw-r--r-- | html.c | 17 |
1 files changed, 1 insertions, 16 deletions
| @@ -843,10 +843,9 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local, | |||
| 843 | int sensitive = 0; | 843 | int sensitive = 0; |
| 844 | char *v; | 844 | char *v; |
| 845 | xs *boosts = NULL; | 845 | xs *boosts = NULL; |
| 846 | int is_public = is_msg_public(snac, msg); | ||
| 847 | 846 | ||
| 848 | /* do not show non-public messages in the public timeline */ | 847 | /* do not show non-public messages in the public timeline */ |
| 849 | if (local && !is_public) | 848 | if (local && !is_msg_public(snac, msg)) |
| 850 | return os; | 849 | return os; |
| 851 | 850 | ||
| 852 | /* hidden? do nothing more for this conversation */ | 851 | /* hidden? do nothing more for this conversation */ |
| @@ -857,20 +856,6 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local, | |||
| 857 | if (level >= 256) | 856 | if (level >= 256) |
| 858 | return os; | 857 | return os; |
| 859 | 858 | ||
| 860 | if (xs_type(xs_dict_get(snac->config, "hide_followers_only")) == XSTYPE_TRUE) { | ||
| 861 | /* test if this is a non-public message not explicitly for this user */ | ||
| 862 | if (!is_public) { | ||
| 863 | const char *to = xs_dict_get(msg, "to"); | ||
| 864 | const char *cc = xs_dict_get(msg, "cc"); | ||
| 865 | |||
| 866 | if ((xs_is_null(to) || xs_list_in(to, snac->actor) == -1) && | ||
| 867 | (xs_is_null(cc) || xs_list_in(cc, snac->actor) == -1)) { | ||
| 868 | snac_debug(snac, 0, xs_fmt("hidden message %s for followers only (%s)", id, md5)); | ||
| 869 | return os; | ||
| 870 | } | ||
| 871 | } | ||
| 872 | } | ||
| 873 | |||
| 874 | xs *s = xs_str_new("<div>\n"); | 859 | xs *s = xs_str_new("<div>\n"); |
| 875 | 860 | ||
| 876 | { | 861 | { |