diff options
| author | default <nobody@localhost> | 2024-09-18 11:05:42 +0200 |
|---|---|---|
| committer | default <nobody@localhost> | 2024-09-18 11:05:42 +0200 |
| commit | b1e7de2fd3e2b4a1b9fbeadcd60a751f2c0edfb1 (patch) | |
| tree | cea1b62b5bd654cfac18bd50fc1137363c8a6023 | |
| parent | 0f3c60d1ee1bdceb4f7ce02609b85d6702812302 (diff) | |
The aka is returned in the alsoKnownAs actor field.
| -rw-r--r-- | activitypub.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/activitypub.c b/activitypub.c index 3830acc..c41dfbd 100644 --- a/activitypub.c +++ b/activitypub.c @@ -1241,6 +1241,14 @@ xs_dict *msg_actor(snac *snac) msg = xs_dict_set(msg, "endpoints", d); } + /* does this user have an aka? */ + const char *aka = xs_dict_get(snac->config, "aka"); + if (xs_type(aka) == XSTYPE_STRING && *aka) { + xs *loaka = xs_list_append(xs_list_new(), aka); + + msg = xs_dict_set(msg, "alsoKnownAs", loaka); + } + return msg; } |