snac2

Fork of https://codeberg.org/grunfink/snac2
git clone https://git.inz.fi/snac2
Log | Files | Refs | README | LICENSE

commit 0bdd1f04203c57661d7b2ee9cdd52e564b3f98c6
parent 545af948dbdd571b7c69f6e437fea5bbad4ab766
Author: default <nobody@localhost>
Date:   Thu, 13 Jul 2023 18:21:30 +0200

Always log send status in post_message().

Diffstat:
Mactivitypub.c | 9+++++----
1 file changed, 5 insertions(+), 4 deletions(-)

diff --git 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); }