Minor tweak.

This commit is contained in:
default 2024-07-01 08:59:32 +02:00
parent 6f772e4770
commit aa3e351951
3 changed files with 4 additions and 2 deletions

View file

@ -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);

2
xs.h
View file

@ -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

View file

@ -1 +1 @@
/* eb935660a9616c92b262b1a92f64f50932b77565 2024-06-20T17:31:26+02:00 */
/* 3896c5f782089f0dca68455565bbcd65dd724c91 2024-07-01T08:55:34+02:00 */