diff options
| author | 2024-09-18 11:05:42 +0200 | |
|---|---|---|
| committer | 2024-09-18 11:05:42 +0200 | |
| commit | b1e7de2fd3e2b4a1b9fbeadcd60a751f2c0edfb1 (patch) | |
| tree | cea1b62b5bd654cfac18bd50fc1137363c8a6023 | |
| parent | New command-line command 'aka'. (diff) | |
| download | penes-snac2-b1e7de2fd3e2b4a1b9fbeadcd60a751f2c0edfb1.tar.gz penes-snac2-b1e7de2fd3e2b4a1b9fbeadcd60a751f2c0edfb1.tar.xz penes-snac2-b1e7de2fd3e2b4a1b9fbeadcd60a751f2c0edfb1.zip | |
The aka is returned in the alsoKnownAs actor field.
Diffstat (limited to '')
| -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) | |||
| 1241 | msg = xs_dict_set(msg, "endpoints", d); | 1241 | msg = xs_dict_set(msg, "endpoints", d); |
| 1242 | } | 1242 | } |
| 1243 | 1243 | ||
| 1244 | /* does this user have an aka? */ | ||
| 1245 | const char *aka = xs_dict_get(snac->config, "aka"); | ||
| 1246 | if (xs_type(aka) == XSTYPE_STRING && *aka) { | ||
| 1247 | xs *loaka = xs_list_append(xs_list_new(), aka); | ||
| 1248 | |||
| 1249 | msg = xs_dict_set(msg, "alsoKnownAs", loaka); | ||
| 1250 | } | ||
| 1251 | |||
| 1244 | return msg; | 1252 | return msg; |
| 1245 | } | 1253 | } |
| 1246 | 1254 | ||