summaryrefslogtreecommitdiff
path: root/activitypub.c
diff options
context:
space:
mode:
authorGravatar default2023-07-13 18:21:30 +0200
committerGravatar default2023-07-13 18:21:30 +0200
commit0bdd1f04203c57661d7b2ee9cdd52e564b3f98c6 (patch)
tree6c47003d28ed03a7bde8d527c20abb4b37fc213b /activitypub.c
parentNew function post_message(), to send a message bypassing the output queue. (diff)
downloadsnac2-0bdd1f04203c57661d7b2ee9cdd52e564b3f98c6.tar.gz
snac2-0bdd1f04203c57661d7b2ee9cdd52e564b3f98c6.tar.xz
snac2-0bdd1f04203c57661d7b2ee9cdd52e564b3f98c6.zip
Always log send status in post_message().
Diffstat (limited to 'activitypub.c')
-rw-r--r--activitypub.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/activitypub.c b/activitypub.c
index c9cf066..2566ba4 100644
--- a/activitypub.c
+++ b/activitypub.c
@@ -335,11 +335,12 @@ void post_message(snac *snac, const char *actor, const xs_dict *msg)
335{ 335{
336 xs *payload = NULL; 336 xs *payload = NULL;
337 int p_size; 337 int p_size;
338 int status;
339 338
340 if (valid_status(status = send_to_actor(snac, actor, msg, &payload, &p_size, 3))) 339 int status = send_to_actor(snac, actor, msg, &payload, &p_size, 3);
341 srv_log(xs_fmt("post_message to actor %s %d", actor, status)); 340
342 else 341 srv_log(xs_fmt("post_message to actor %s %d", actor, status));
342
343 if (!valid_status(status))
343 /* cannot send right now, enqueue */ 344 /* cannot send right now, enqueue */
344 enqueue_message(snac, msg); 345 enqueue_message(snac, msg);
345} 346}