mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-12-26 01:03:37 +00:00
Don't store messages in public/ that are not public.
They weren't shown anyway, but it's better to be sure.
This commit is contained in:
parent
3c95c8a7a3
commit
3929778ea1
1 changed files with 9 additions and 2 deletions
11
data.c
11
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");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue