diff options
| author | David Vaughan <david@davidv.xyz> | 2026-02-04 18:40:08 -0800 |
|---|---|---|
| committer | David Vaughan <david@davidv.xyz> | 2026-02-06 12:08:18 -0800 |
| commit | fdb2be4621698123f35cf2daf25d2b00ac0e4fee (patch) | |
| tree | e5dca31bef86d052c4bf2aae1959100cc0f29ee3 | |
| parent | 79cf2cae3986c18be2830db79f9fcfd641a4c19d (diff) | |
Check global object store for poll id when voting via mastoapi
| -rw-r--r-- | mastoapi.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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); |