snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit 759042dc9f9ae10eb98c68fab1db3c97878097a5
parent 22cc5f42a5a74dc5b5f2e18e56fd7be17fa784b5
Author: default <nobody@localhost>
Date:   Mon, 16 Oct 2023 19:19:41 +0200

Drop updates for unknown posts.

Diffstat:
Mactivitypub.c | 10+++++++---
1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/activitypub.c b/activitypub.c @@ -1692,10 +1692,14 @@ int process_input_message(snac *snac, xs_dict *msg, xs_dict *req) if (xs_match(utype, "Note|Page|Article")) { /** **/ const char *id = xs_dict_get(object, "id"); - object_add_ow(id, object); - timeline_touch(snac); + if (object_here(id)) { + object_add_ow(id, object); + timeline_touch(snac); - snac_log(snac, xs_fmt("updated post %s", id)); + snac_log(snac, xs_fmt("updated post %s", id)); + } + else + snac_log(snac, xs_fmt("dropped update for unknown post %s", id)); } else if (strcmp(utype, "Question") == 0) { /** **/