mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-11-22 21:35:04 +00:00
Revert "Implemented hide_followers_only."
Posts from groups give false positives from hide_followers_only,
so the full idea is discarded.
This reverts commit b3797d2416
.
This commit is contained in:
parent
cdb201cc04
commit
18976dc6b8
1 changed files with 1 additions and 16 deletions
17
html.c
17
html.c
|
@ -843,10 +843,9 @@ xs_str *html_entry(snac *snac, xs_str *os, const xs_dict *msg, int local,
|
||||||
int sensitive = 0;
|
int sensitive = 0;
|
||||||
char *v;
|
char *v;
|
||||||
xs *boosts = NULL;
|
xs *boosts = NULL;
|
||||||
int is_public = is_msg_public(snac, msg);
|
|
||||||
|
|
||||||
/* do not show non-public messages in the public timeline */
|
/* do not show non-public messages in the public timeline */
|
||||||
if (local && !is_public)
|
if (local && !is_msg_public(snac, msg))
|
||||||
return os;
|
return os;
|
||||||
|
|
||||||
/* hidden? do nothing more for this conversation */
|
/* 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,
|
||||||
if (level >= 256)
|
if (level >= 256)
|
||||||
return os;
|
return os;
|
||||||
|
|
||||||
if (xs_type(xs_dict_get(snac->config, "hide_followers_only")) == XSTYPE_TRUE) {
|
|
||||||
/* test if this is a non-public message not explicitly for this user */
|
|
||||||
if (!is_public) {
|
|
||||||
const char *to = xs_dict_get(msg, "to");
|
|
||||||
const char *cc = xs_dict_get(msg, "cc");
|
|
||||||
|
|
||||||
if ((xs_is_null(to) || xs_list_in(to, snac->actor) == -1) &&
|
|
||||||
(xs_is_null(cc) || xs_list_in(cc, snac->actor) == -1)) {
|
|
||||||
snac_debug(snac, 0, xs_fmt("hidden message %s for followers only (%s)", id, md5));
|
|
||||||
return os;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
xs *s = xs_str_new("<div>\n");
|
xs *s = xs_str_new("<div>\n");
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue