summary refs log tree commit diff
path: root/src/util/entities
diff options
context:
space:
mode:
authorMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-10-26 05:39:22 +0000
committerMadeline <46743919+MaddyUnderStars@users.noreply.github.com>2023-10-26 05:39:22 +0000
commitcc48f595fdecfdb2825f4023fb157ff5f0e8ded6 (patch)
tree974b4612b87bf5b3fc04933f2c731d83f1ee083c /src/util/entities
parentbasic channel federation (diff)
downloadserver-cc48f595fdecfdb2825f4023fb157ff5f0e8ded6.tar.xz
bug fixes and improvements (i wrote this code a week ago and forgot what it does) feat/federation2
Diffstat (limited to 'src/util/entities')
-rw-r--r--src/util/entities/FederationKeys.ts20
1 files changed, 16 insertions, 4 deletions
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,