diff options
author | default <nobody@localhost> | 2022-12-03 20:28:23 +0100 |
---|---|---|
committer | default <nobody@localhost> | 2022-12-03 20:28:23 +0100 |
commit | 3929778ea1e37c48d4d94a804f5dd32bcf89b926 (patch) | |
tree | b5c816a57e15f8a8a72346b7e512441f0f5d3ecb | |
parent | 3c95c8a7a3363c7f0c539e42ede98b88373b72ec (diff) |
Don't store messages in public/ that are not public.
They weren't shown anyway, but it's better to be sure.
-rw-r--r-- | data.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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"); + } + } } |