snac2

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

commit aa3e351951751adbfaf87ed1bdb63767221dd214
parent 6f772e477059973f6c5408e380db6409374316bf
Author: default <nobody@localhost>
Date:   Mon,  1 Jul 2024 08:59:32 +0200

Minor tweak.

Diffstat:
Mactivitypub.c | 2+-
Mxs.h | 2++
Mxs_version.h | 2+-
3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/activitypub.c b/activitypub.c @@ -935,7 +935,7 @@ void notify(snac *snac, const char *type, const char *utype, const char *actor, enqueue_ntfy(body, ntfy_server, ntfy_token); /* auto boost */ - if (xs_match(type, "Create") && xs_type(xs_dict_get(snac->config, "auto_boost")) == XSTYPE_TRUE) { + if (xs_match(type, "Create") && xs_is_true(xs_dict_get(snac->config, "auto_boost"))) { xs *msg = msg_admiration(snac, objid, "Announce"); enqueue_message(snac, msg); diff --git a/xs.h b/xs.h @@ -149,6 +149,8 @@ unsigned int xs_hash_func(const char *data, int size); #define xs_return(v) xs_val *__r = v; v = NULL; return __r +#define xs_is_true(v) (xs_type((v)) == XSTYPE_TRUE) +#define xs_is_false(v) (xs_type((v)) == XSTYPE_FALSE) #ifdef XS_IMPLEMENTATION diff --git a/xs_version.h b/xs_version.h @@ -1 +1 @@ -/* eb935660a9616c92b262b1a92f64f50932b77565 2024-06-20T17:31:26+02:00 */ +/* 3896c5f782089f0dca68455565bbcd65dd724c91 2024-07-01T08:55:34+02:00 */