summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar grunfink2023-06-11 16:58:54 +0000
committerGravatar grunfink2023-06-11 16:58:54 +0000
commit52d54ed73b9f71cefa7ccc589ee67960f4309cb6 (patch)
tree916e8a53739f9eb2abf8dc2b69ecdd8dd0fc4063
parentFixed comment. (diff)
parentset bot to true in mastodon account if user type is service (diff)
downloadsnac2-52d54ed73b9f71cefa7ccc589ee67960f4309cb6.tar.gz
snac2-52d54ed73b9f71cefa7ccc589ee67960f4309cb6.tar.xz
snac2-52d54ed73b9f71cefa7ccc589ee67960f4309cb6.zip
Merge pull request 'set bot to true for bots in mastodon api' (#45) from Haijo7/snac2:masto-api-user-type into master
Reviewed-on: https://codeberg.org/grunfink/snac2/pulls/45
-rw-r--r--mastoapi.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mastoapi.c b/mastoapi.c
index acefe57..3b9db28 100644
--- a/mastoapi.c
+++ b/mastoapi.c
@@ -522,6 +522,11 @@ xs_dict *mastoapi_account(const xs_dict *actor)
522 if (xs_is_null(note)) 522 if (xs_is_null(note))
523 note = ""; 523 note = "";
524 524
525 if (strcmp(xs_dict_get(actor, "type"), "Service") == 0)
526 acct = xs_dict_append(acct, "bot", "true");
527 else
528 acct = xs_dict_append(acct, "bot", "false");
529
525 acct = xs_dict_append(acct, "note", note); 530 acct = xs_dict_append(acct, "note", note);
526 531
527 acct = xs_dict_append(acct, "url", id); 532 acct = xs_dict_append(acct, "url", id);