diff options
author | default <nobody@localhost> | 2023-07-13 18:21:30 +0200 |
---|---|---|
committer | default <nobody@localhost> | 2023-07-13 18:21:30 +0200 |
commit | 0bdd1f04203c57661d7b2ee9cdd52e564b3f98c6 (patch) | |
tree | 6c47003d28ed03a7bde8d527c20abb4b37fc213b | |
parent | 545af948dbdd571b7c69f6e437fea5bbad4ab766 (diff) |
Always log send status in post_message().
-rw-r--r-- | activitypub.c | 9 |
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) { xs *payload = NULL; int p_size; - int status; - if (valid_status(status = send_to_actor(snac, actor, msg, &payload, &p_size, 3))) - srv_log(xs_fmt("post_message to actor %s %d", actor, status)); - else + int status = send_to_actor(snac, actor, msg, &payload, &p_size, 3); + + srv_log(xs_fmt("post_message to actor %s %d", actor, status)); + + if (!valid_status(status)) /* cannot send right now, enqueue */ enqueue_message(snac, msg); } |