mirror of
https://codeberg.org/grunfink/snac2.git
synced 2024-09-19 18:00:23 +03:00
If a user config field 'bot' is set to true, identies as such.
This commit is contained in:
parent
3a8005f9bf
commit
0d817340e2
@ -803,6 +803,10 @@ xs_dict *msg_actor(snac *snac)
|
||||
keys = xs_dict_append(keys, "publicKeyPem", xs_dict_get(snac->key, "public"));
|
||||
msg = xs_dict_set(msg, "publicKey", keys);
|
||||
|
||||
/* if the "bot" config field is set to true, change type to "Service" */
|
||||
if (xs_type(xs_dict_get(snac->config, "bot")) == XSTYPE_TRUE)
|
||||
msg = xs_dict_set(msg, "type", "Service");
|
||||
|
||||
return msg;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user