diff options
| author | 2022-12-16 07:09:25 +0100 | |
|---|---|---|
| committer | 2022-12-16 07:09:25 +0100 | |
| commit | 427f7341fa5db23b9e67a1d1035bb3dc12d35f40 (patch) | |
| tree | bc0579dcd28d457163851d67df230d72b970c5bc /activitypub.c | |
| parent | Lower debug level to repeated follows. (diff) | |
| download | snac2-427f7341fa5db23b9e67a1d1035bb3dc12d35f40.tar.gz snac2-427f7341fa5db23b9e67a1d1035bb3dc12d35f40.tar.xz snac2-427f7341fa5db23b9e67a1d1035bb3dc12d35f40.zip | |
New function enqueue_message().
Diffstat (limited to '')
| -rw-r--r-- | activitypub.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/activitypub.c b/activitypub.c index 9a63de7..79ec98b 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -990,6 +990,17 @@ void process_queue(snac *snac) | |||
| 990 | if ((type = xs_dict_get(q_item, "type")) == NULL) | 990 | if ((type = xs_dict_get(q_item, "type")) == NULL) |
| 991 | type = "output"; | 991 | type = "output"; |
| 992 | 992 | ||
| 993 | if (strcmp(type, "message") == 0) { | ||
| 994 | char *msg = xs_dict_get(q_item, "message"); | ||
| 995 | xs *inboxes = inbox_list(snac, msg); | ||
| 996 | char *p, *v; | ||
| 997 | |||
| 998 | p = inboxes; | ||
| 999 | while (xs_list_iter(&p, &v)) { | ||
| 1000 | enqueue_output(snac, msg, v, 0); | ||
| 1001 | } | ||
| 1002 | } | ||
| 1003 | else | ||
| 993 | if (strcmp(type, "output") == 0) { | 1004 | if (strcmp(type, "output") == 0) { |
| 994 | int status; | 1005 | int status; |
| 995 | char *inbox = xs_dict_get(q_item, "inbox"); | 1006 | char *inbox = xs_dict_get(q_item, "inbox"); |