diff options
| author | 2026-02-04 18:40:08 -0800 | |
|---|---|---|
| committer | 2026-02-06 12:08:18 -0800 | |
| commit | fdb2be4621698123f35cf2daf25d2b00ac0e4fee (patch) | |
| tree | e5dca31bef86d052c4bf2aae1959100cc0f29ee3 /mastoapi.c | |
| parent | Updated TODO. (diff) | |
| download | snac2-fdb2be4621698123f35cf2daf25d2b00ac0e4fee.tar.gz snac2-fdb2be4621698123f35cf2daf25d2b00ac0e4fee.tar.xz snac2-fdb2be4621698123f35cf2daf25d2b00ac0e4fee.zip | |
Check global object store for poll id when voting via mastoapi
Diffstat (limited to 'mastoapi.c')
| -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, | |||
| 3685 | /* skip the 'fake' part of the id */ | 3685 | /* skip the 'fake' part of the id */ |
| 3686 | mid = MID_TO_MD5(mid); | 3686 | mid = MID_TO_MD5(mid); |
| 3687 | 3687 | ||
| 3688 | if (valid_status(timeline_get_by_md5(&snac, mid, &msg))) { | 3688 | /* try timeline first, then global object store for remote posts */ |
| 3689 | int found = valid_status(timeline_get_by_md5(&snac, mid, &msg)); | ||
| 3690 | if (!found) | ||
| 3691 | found = valid_status(object_get_by_md5(mid, &msg)); | ||
| 3692 | |||
| 3693 | if (found) { | ||
| 3689 | const char *id = xs_dict_get(msg, "id"); | 3694 | const char *id = xs_dict_get(msg, "id"); |
| 3690 | const char *atto = get_atto(msg); | 3695 | const char *atto = get_atto(msg); |
| 3691 | 3696 | ||