summaryrefslogtreecommitdiff
path: root/html.c
diff options
context:
space:
mode:
authorGravatar default2024-04-17 08:09:05 +0200
committerGravatar default2024-04-17 08:09:05 +0200
commit44d126e0f96748f7f5e0c8a95ed8b3f5f69cd0f0 (patch)
tree0e4f07f3678c5a3738e6412be14aeb0bd5423df1 /html.c
parentDon't skip orphan private posts that are for us. (diff)
downloadsnac2-44d126e0f96748f7f5e0c8a95ed8b3f5f69cd0f0.tar.gz
snac2-44d126e0f96748f7f5e0c8a95ed8b3f5f69cd0f0.tar.xz
snac2-44d126e0f96748f7f5e0c8a95ed8b3f5f69cd0f0.zip
Improved non-public reply check.
Diffstat (limited to 'html.c')
-rw-r--r--html.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/html.c b/html.c
index 59ada61..0fca601 100644
--- a/html.c
+++ b/html.c
@@ -2054,11 +2054,13 @@ xs_str *html_timeline(snac *user, const xs_list *list, int read_only,
2054 if (user != NULL && !is_msg_public(msg)) { 2054 if (user != NULL && !is_msg_public(msg)) {
2055 char *irt = xs_dict_get(msg, "inReplyTo"); 2055 char *irt = xs_dict_get(msg, "inReplyTo");
2056 2056
2057 /* is it a reply to something not in the storage? */
2057 if (!xs_is_null(irt) && !object_here(irt)) { 2058 if (!xs_is_null(irt) && !object_here(irt)) {
2058 /* is it for me? */ 2059 /* is it for me? */
2059 xs_list *to = xs_dict_get(msg, "to"); 2060 xs_list *to = xs_dict_get_def(msg, "to", xs_stock(XSTYPE_LIST));
2061 xs_list *cc = xs_dict_get_def(msg, "cc", xs_stock(XSTYPE_LIST));
2060 2062
2061 if (xs_type(to) == XSTYPE_LIST && xs_list_in(to, user->actor) == -1) { 2063 if (xs_list_in(to, user->actor) == -1 && xs_list_in(cc, user->actor) == -1) {
2062 snac_debug(user, 1, xs_fmt("skipping non-public reply to an unknown post %s", v)); 2064 snac_debug(user, 1, xs_fmt("skipping non-public reply to an unknown post %s", v));
2063 continue; 2065 continue;
2064 } 2066 }