diff options
| author | 2022-09-26 09:28:39 +0200 | |
|---|---|---|
| committer | 2022-09-26 09:28:39 +0200 | |
| commit | f410e3a40a9943e8c657a886f3c8e343374da45e (patch) | |
| tree | dc7fc219e89b4ef23f8f82043e755ac9ba96a5ae | |
| parent | New function is_msg_public(). (diff) | |
| download | snac2-f410e3a40a9943e8c657a886f3c8e343374da45e.tar.gz snac2-f410e3a40a9943e8c657a886f3c8e343374da45e.tar.xz snac2-f410e3a40a9943e8c657a886f3c8e343374da45e.zip | |
New function post.
| -rw-r--r-- | activitypub.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/activitypub.c b/activitypub.c index 923028c..f08c44c 100644 --- a/activitypub.c +++ b/activitypub.c | |||
| @@ -431,6 +431,19 @@ int is_msg_public(snac *snac, char *msg) | |||
| 431 | } | 431 | } |
| 432 | 432 | ||
| 433 | 433 | ||
| 434 | void post(snac *snac, char *msg) | ||
| 435 | /* enqueues a message to all its recipients */ | ||
| 436 | { | ||
| 437 | xs *rcpts = recipient_list(snac, msg, 1); | ||
| 438 | char *p, *v; | ||
| 439 | |||
| 440 | p = rcpts; | ||
| 441 | while (xs_list_iter(&p, &v)) { | ||
| 442 | enqueue_output(snac, msg, v, 0); | ||
| 443 | } | ||
| 444 | } | ||
| 445 | |||
| 446 | |||
| 434 | /** HTTP handlers */ | 447 | /** HTTP handlers */ |
| 435 | 448 | ||
| 436 | int activitypub_get_handler(d_char *req, char *q_path, | 449 | int activitypub_get_handler(d_char *req, char *q_path, |