diff options
| author | 2023-06-11 16:58:54 +0000 | |
|---|---|---|
| committer | 2023-06-11 16:58:54 +0000 | |
| commit | 52d54ed73b9f71cefa7ccc589ee67960f4309cb6 (patch) | |
| tree | 916e8a53739f9eb2abf8dc2b69ecdd8dd0fc4063 | |
| parent | Fixed comment. (diff) | |
| parent | set bot to true in mastodon account if user type is service (diff) | |
| download | snac2-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.c | 5 |
1 files changed, 5 insertions, 0 deletions
| @@ -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); |