From 3929778ea1e37c48d4d94a804f5dd32bcf89b926 Mon Sep 17 00:00:00 2001 From: default Date: Sat, 3 Dec 2022 20:28:23 +0100 Subject: [PATCH] Don't store messages in public/ that are not public. They weren't shown anyway, but it's better to be sure. --- data.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/data.c b/data.c index 36fa65e..0c58f8e 100644 --- a/data.c +++ b/data.c @@ -780,8 +780,15 @@ void timeline_update_indexes(snac *snac, const char *id) { object_user_cache_add(snac, id, "private"); - if (xs_startswith(id, snac->actor)) - object_user_cache_add(snac, id, "public"); + if (xs_startswith(id, snac->actor)) { + xs *msg = NULL; + + if (valid_status(object_get(id, &msg, NULL))) { + /* if its ours and is public, also store in public */ + if (is_msg_public(snac, msg)) + object_user_cache_add(snac, id, "public"); + } + } }