commit d87d294
grunfink
·
2025-06-16 16:16:45 +0000 UTC
parent 7a75f1e
In enqueue_notify_webhook(), also add the inReplyTo object if there is one.
1 files changed,
+10,
-0
M
data.c
M
data.c
+10,
-0
1@@ -3543,6 +3543,16 @@ void enqueue_notify_webhook(snac *user, const xs_dict *noti, int retries)
2 if (valid_status(object_get(xs_dict_get(noti, "actor"), &actor_obj)) && actor_obj)
3 msg = xs_dict_set(msg, "account", actor_obj);
4
5+ /* if this post is a reply, also add the inReplyTo object */
6+ const char *in_reply_to = xs_dict_get_path(msg, "msg.object.inReplyTo");
7+
8+ if (xs_is_string(in_reply_to)) {
9+ xs *irt_obj = NULL;
10+
11+ if (valid_status(object_get(in_reply_to, &irt_obj)))
12+ msg = xs_dict_set(msg, "inReplyTo", irt_obj);
13+ }
14+
15 xs *qmsg = _new_qmsg("notify_webhook", msg, retries);
16 const char *ntid = xs_dict_get(qmsg, "ntid");
17 xs *fn = xs_fmt("%s/queue/%s.json", user->basedir, ntid);