summaryrefslogtreecommitdiff
path: root/mastoapi.c
diff options
context:
space:
mode:
authorGravatar David Vaughan2026-02-04 18:40:08 -0800
committerGravatar David Vaughan2026-02-06 12:08:18 -0800
commitfdb2be4621698123f35cf2daf25d2b00ac0e4fee (patch)
treee5dca31bef86d052c4bf2aae1959100cc0f29ee3 /mastoapi.c
parentUpdated TODO. (diff)
downloadsnac2-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.c7
1 files changed, 6 insertions, 1 deletions
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,
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