summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar grunfink2025-06-16 18:16:45 +0200
committerGravatar grunfink2025-06-16 18:16:45 +0200
commitd87d294b7ddd93b16d0c89c324612aef5c6d648e (patch)
tree908cf18084cdbda88871bbd228de7b60798ffcac
parentUpdated RELEASE_NOTES. (diff)
downloadsnac2-d87d294b7ddd93b16d0c89c324612aef5c6d648e.tar.gz
snac2-d87d294b7ddd93b16d0c89c324612aef5c6d648e.tar.xz
snac2-d87d294b7ddd93b16d0c89c324612aef5c6d648e.zip
In enqueue_notify_webhook(), also add the inReplyTo object if there is one.
Diffstat (limited to '')
-rw-r--r--data.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/data.c b/data.c
index 6c38631..32b47d8 100644
--- a/data.c
+++ b/data.c
@@ -3543,6 +3543,16 @@ void enqueue_notify_webhook(snac *user, const xs_dict *noti, int retries)
3543 if (valid_status(object_get(xs_dict_get(noti, "actor"), &actor_obj)) && actor_obj) 3543 if (valid_status(object_get(xs_dict_get(noti, "actor"), &actor_obj)) && actor_obj)
3544 msg = xs_dict_set(msg, "account", actor_obj); 3544 msg = xs_dict_set(msg, "account", actor_obj);
3545 3545
3546 /* if this post is a reply, also add the inReplyTo object */
3547 const char *in_reply_to = xs_dict_get_path(msg, "msg.object.inReplyTo");
3548
3549 if (xs_is_string(in_reply_to)) {
3550 xs *irt_obj = NULL;
3551
3552 if (valid_status(object_get(in_reply_to, &irt_obj)))
3553 msg = xs_dict_set(msg, "inReplyTo", irt_obj);
3554 }
3555
3546 xs *qmsg = _new_qmsg("notify_webhook", msg, retries); 3556 xs *qmsg = _new_qmsg("notify_webhook", msg, retries);
3547 const char *ntid = xs_dict_get(qmsg, "ntid"); 3557 const char *ntid = xs_dict_get(qmsg, "ntid");
3548 xs *fn = xs_fmt("%s/queue/%s.json", user->basedir, ntid); 3558 xs *fn = xs_fmt("%s/queue/%s.json", user->basedir, ntid);