Browse Source

Minor tweak.

default 9 months ago
parent
commit
aa3e351951
3 changed files with 4 additions and 2 deletions
  1. 1 1
      activitypub.c
  2. 2 0
      xs.h
  3. 1 1
      xs_version.h

+ 1 - 1
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);
 

+ 2 - 0
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
 

+ 1 - 1
xs_version.h

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