Преглед изворни кода

Preprocess the webmention q_item.

Nothing is really done yet.
grunfink пре 1 година
родитељ
комит
bca51ef5ba
1 измењених фајлова са 13 додато и 0 уклоњено
  1. 13 0
      activitypub.c

+ 13 - 0
activitypub.c

@@ -3025,6 +3025,19 @@ void process_queue_item(xs_dict *q_item)
             }
         }
     }
+    else
+    if (strcmp(type, "webmention") == 0) {
+        const xs_dict *msg = xs_dict_get(q_item, "message");
+        const char *source = xs_dict_get(msg, "id");
+        const xs_list *atts = xs_dict_get(msg, "attachment");
+        const xs_dict *att;
+
+        xs_list_foreach(atts, att) {
+            const char *target = xs_dict_get(att, "url");
+
+            srv_debug(1, xs_fmt("webmention source=%s target=%s", source, target));
+        }
+    }
     else
         srv_log(xs_fmt("unexpected q_item type '%s'", type));
 }