Serialize Inbox, SharedInbox & Endpoints in ASUserRenderer

This commit is contained in:
Laura Hausmann 2024-01-23 01:52:06 +01:00
parent a4d787331b
commit 6a80e503d9
No known key found for this signature in database
GPG key ID: D044E84C5BE01605

View file

@ -28,22 +28,22 @@ public class APUserRenderer(
: "Person";
return new ASActor {
Id = id,
Type = [type],
//Inbox = $"{id}/inbox",
Id = id,
Type = [type],
Inbox = new ASLink($"{id}/inbox"),
//Outbox = $"{id}/outbox",
//Followers = $"{id}/followers",
//Following = $"{id}/following",
//SharedInbox = $"{Config.Instance.Url}/inbox",
//Endpoints = new Dictionary<string, string> { { "SharedInbox", $"{Config.Instance.Url}/inbox" } },
Url = new ASLink($"https://{config.Value.WebDomain}/@{user.Username}"),
Username = user.Username,
DisplayName = user.Name ?? user.Username,
Summary = profile?.Description != null ? "Not implemented" : null, //TODO: convert to html
MkSummary = profile?.Description,
IsCat = user.IsCat,
SharedInbox = new ASLink($"https://{config.Value.WebDomain}/inbox"),
Endpoints = new ASEndpoints { SharedInbox = new LDIdObject($"https://{config.Value.WebDomain}/inbox") },
Url = new ASLink($"https://{config.Value.WebDomain}/@{user.Username}"),
Username = user.Username,
DisplayName = user.Name ?? user.Username,
Summary = profile?.Description != null ? "Not implemented" : null, //TODO: convert to html
MkSummary = profile?.Description,
IsCat = user.IsCat,
IsDiscoverable = user.IsExplorable,
IsLocked = user.IsLocked,
IsLocked = user.IsLocked,
PublicKey = new ASPublicKey {
Id = $"{id}#main-key",
Owner = new LDIdObject(id),