From fdb2be4621698123f35cf2daf25d2b00ac0e4fee Mon Sep 17 00:00:00 2001 From: David Vaughan Date: Wed, 4 Feb 2026 18:40:08 -0800 Subject: Check global object store for poll id when voting via mastoapi --- mastoapi.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/mastoapi.c b/mastoapi.c index dd80abc..16cab27 100644 --- a/mastoapi.c +++ b/mastoapi.c @@ -3685,7 +3685,12 @@ int mastoapi_post_handler(const xs_dict *req, const char *q_path, /* skip the 'fake' part of the id */ mid = MID_TO_MD5(mid); - if (valid_status(timeline_get_by_md5(&snac, mid, &msg))) { + /* try timeline first, then global object store for remote posts */ + int found = valid_status(timeline_get_by_md5(&snac, mid, &msg)); + if (!found) + found = valid_status(object_get_by_md5(mid, &msg)); + + if (found) { const char *id = xs_dict_get(msg, "id"); const char *atto = get_atto(msg); -- cgit v1.2.3