commit bca51ef
grunfink
·
2025-05-03 17:39:04 +0000 UTC
parent 90e9a0a
Preprocess the webmention q_item. Nothing is really done yet.
1 files changed,
+13,
-0
+13,
-0
1@@ -3025,6 +3025,19 @@ void process_queue_item(xs_dict *q_item)
2 }
3 }
4 }
5+ else
6+ if (strcmp(type, "webmention") == 0) {
7+ const xs_dict *msg = xs_dict_get(q_item, "message");
8+ const char *source = xs_dict_get(msg, "id");
9+ const xs_list *atts = xs_dict_get(msg, "attachment");
10+ const xs_dict *att;
11+
12+ xs_list_foreach(atts, att) {
13+ const char *target = xs_dict_get(att, "url");
14+
15+ srv_debug(1, xs_fmt("webmention source=%s target=%s", source, target));
16+ }
17+ }
18 else
19 srv_log(xs_fmt("unexpected q_item type '%s'", type));
20 }