snac2

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

commit 35b35ec3afff47be872004448e6ba81a6a339131
parent 36c3030231ed806c29c182e38cb0957993c835d1
Author: default <nobody@localhost>
Date:   Sun, 24 Nov 2024 08:03:51 +0100

Return the 'manuallyApprovesFollowers' actor field according to user configuration.

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

diff --git a/activitypub.c b/activitypub.c @@ -1287,6 +1287,10 @@ xs_dict *msg_actor(snac *snac) msg = xs_dict_set(msg, "alsoKnownAs", loaka); } + const xs_val *manually = xs_dict_get(snac->config, "approve_followers"); + msg = xs_dict_set(msg, "manuallyApprovesFollowers", + xs_stock(xs_is_true(manually) ? XSTYPE_TRUE : XSTYPE_FALSE)); + return msg; }