Compare commits

...

2 Commits

Author SHA1 Message Date
default 44d126e0f9 Improved non-public reply check. 2024-04-17 08:09:05 +02:00
default 2e31253ba8 Don't skip orphan private posts that are for us. 2024-04-17 06:45:19 +02:00
1 changed files with 9 additions and 2 deletions

11
html.c
View File

@ -2054,9 +2054,16 @@ xs_str *html_timeline(snac *user, const xs_list *list, int read_only,
if (user != NULL && !is_msg_public(msg)) {
char *irt = xs_dict_get(msg, "inReplyTo");
/* is it a reply to something not in the storage? */
if (!xs_is_null(irt) && !object_here(irt)) {
snac_debug(user, 1, xs_fmt("skipping non-public reply to an unknown post %s", v));
continue;
/* is it for me? */
xs_list *to = xs_dict_get_def(msg, "to", xs_stock(XSTYPE_LIST));
xs_list *cc = xs_dict_get_def(msg, "cc", xs_stock(XSTYPE_LIST));
if (xs_list_in(to, user->actor) == -1 && xs_list_in(cc, user->actor) == -1) {
snac_debug(user, 1, xs_fmt("skipping non-public reply to an unknown post %s", v));
continue;
}
}
}