diff options
author | default <nobody@localhost> | 2024-02-10 09:08:09 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2024-02-10 09:08:09 +0100 |
commit | 0930ce726fa5750eed4f1f53627428dab0944f1a (patch) | |
tree | 108b4d8b29f20b418c289777e81fbde5a2821477 /html.c | |
parent | 151c5aa6ec4fb0f3b0e0d8ca62f9dc5ad27b14e0 (diff) |
New function is_msg_from_private_user().
Diffstat (limited to 'html.c')
-rw-r--r-- | html.c | 21 |
1 files changed, 3 insertions, 18 deletions
@@ -1911,24 +1911,9 @@ xs_str *html_timeline(snac *user, const xs_list *list, int local, if (!valid_status(status)) continue; - /* if it's an instance page, discard private users */ - if (user == NULL && xs_startswith(xs_dict_get(msg, "id"), srv_baseurl)) { - const char *atto = get_atto(msg); - xs *l = xs_split(atto, "/"); - const char *uid = xs_list_get(l, -1); - snac user; - int skip = 1; - - if (uid && user_open(&user, uid)) { - if (xs_type(xs_dict_get(user.config, "private")) != XSTYPE_TRUE) - skip = 0; - - user_free(&user); - } - - if (skip) - continue; - } + /* if it's an instance page, discard messages from private users */ + if (user == NULL && is_msg_from_private_user(msg)) + continue; xs_html *entry = html_entry(user, msg, local, 0, v, user ? 0 : 1); |