From cc48f595fdecfdb2825f4023fb157ff5f0e8ded6 Mon Sep 17 00:00:00 2001 From: Madeline <46743919+MaddyUnderStars@users.noreply.github.com> Date: Thu, 26 Oct 2023 05:39:22 +0000 Subject: bug fixes and improvements (i wrote this code a week ago and forgot what it does) --- src/util/entities/FederationKeys.ts | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src/util/entities') diff --git a/src/util/entities/FederationKeys.ts b/src/util/entities/FederationKeys.ts index 332e13e1..86e72bd2 100644 --- a/src/util/entities/FederationKeys.ts +++ b/src/util/entities/FederationKeys.ts @@ -34,12 +34,20 @@ export class FederationKey extends BaseClassWithoutId { federatedId: string; /** The inbox of the remote user */ - @Column({ nullable: true, type: String }) - inbox: string | null; + @Column() + inbox: string; /** The outbox of the remote user */ - @Column({ nullable: true, type: String }) - outbox: string | null; + @Column() + outbox: string; + + /** The following collection of this user */ + @Column() + following: string; + + /** The followers collection of this user */ + @Column() + followers: string; /** The public key of this actor. Public keys of remote actors are cached. */ @Column() @@ -63,6 +71,10 @@ export class FederationKey extends BaseClassWithoutId { actorId, type, federatedId: `https://${host}/federation/${type}/${actorId}`, + inbox: `https://${host}/federation/${type}/${actorId}/inbox`, + outbox: `https://${host}/federation/${type}/${actorId}/outbox`, + followers: `https://${host}/federation/${type}/${actorId}/followers`, + following: `https://${host}/federation/${type}/${actorId}/following`, domain: accountDomain, ...(await generateKeyPair("rsa", { modulusLength: 4096, -- cgit 1.4.1