summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--activitypub.c2
-rw-r--r--xs.h2
-rw-r--r--xs_version.h2
3 files changed, 4 insertions, 2 deletions
diff --git a/activitypub.c b/activitypub.c
index 5b75506..63bdab9 100644
--- 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
index f479108..f250764 100644
--- 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
index 5304f4a..1f05b57 100644
--- 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 */