diff options
| author | 2022-12-03 20:28:23 +0100 | |
|---|---|---|
| committer | 2022-12-03 20:28:23 +0100 | |
| commit | 3929778ea1e37c48d4d94a804f5dd32bcf89b926 (patch) | |
| tree | b5c816a57e15f8a8a72346b7e512441f0f5d3ecb | |
| parent | Set default max_timeline_entries to 128. (diff) | |
| download | snac2-3929778ea1e37c48d4d94a804f5dd32bcf89b926.tar.gz snac2-3929778ea1e37c48d4d94a804f5dd32bcf89b926.tar.xz snac2-3929778ea1e37c48d4d94a804f5dd32bcf89b926.zip | |
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) | |||
| 780 | { | 780 | { |
| 781 | object_user_cache_add(snac, id, "private"); | 781 | object_user_cache_add(snac, id, "private"); |
| 782 | 782 | ||
| 783 | if (xs_startswith(id, snac->actor)) | 783 | if (xs_startswith(id, snac->actor)) { |
| 784 | object_user_cache_add(snac, id, "public"); | 784 | xs *msg = NULL; |
| 785 | |||
| 786 | if (valid_status(object_get(id, &msg, NULL))) { | ||
| 787 | /* if its ours and is public, also store in public */ | ||
| 788 | if (is_msg_public(snac, msg)) | ||
| 789 | object_user_cache_add(snac, id, "public"); | ||
| 790 | } | ||
| 791 | } | ||
| 785 | } | 792 | } |
| 786 | 793 | ||
| 787 | 794 | ||