commit 3929778
default
·
2022-12-03 19:28:23 +0000 UTC
parent 3c95c8a
Don't store messages in public/ that are not public. They weren't shown anyway, but it's better to be sure.
1 files changed,
+9,
-2
M
data.c
M
data.c
+9,
-2
1@@ -780,8 +780,15 @@ void timeline_update_indexes(snac *snac, const char *id)
2 {
3 object_user_cache_add(snac, id, "private");
4
5- if (xs_startswith(id, snac->actor))
6- object_user_cache_add(snac, id, "public");
7+ if (xs_startswith(id, snac->actor)) {
8+ xs *msg = NULL;
9+
10+ if (valid_status(object_get(id, &msg, NULL))) {
11+ /* if its ours and is public, also store in public */
12+ if (is_msg_public(snac, msg))
13+ object_user_cache_add(snac, id, "public");
14+ }
15+ }
16 }
17
18