From 87cf621e21283728b2bb5517c6a6981087cc7ce5 Mon Sep 17 00:00:00 2001 From: Tobi Smethurst <31960611+tsmethurst@users.noreply.github.com> Date: Sun, 27 Jun 2021 16:52:18 +0200 Subject: Remote instance dereferencing (#70) Remote instances are now dereferenced when they post to an inbox on a GtS instance. Dereferencing will be done first by checking the /api/v1/instance endpoint of an instance. If that doesn't work, /.well-known/nodeinfo will be checked. If that doesn't work, only a minimal representation of the instance will be stored. A new field was added to the Instance database model. To create it: alter table instances add column contact_account_username text; --- internal/gtsmodel/instance.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'internal/gtsmodel/instance.go') diff --git a/internal/gtsmodel/instance.go b/internal/gtsmodel/instance.go index f39231319..c13c35f43 100644 --- a/internal/gtsmodel/instance.go +++ b/internal/gtsmodel/instance.go @@ -28,6 +28,8 @@ type Instance struct { Terms string // Contact email address for this instance ContactEmail string + // Username of the contact account for this instance + ContactAccountUsername string // Contact account ID in the database for this instance ContactAccountID string `pg:"type:CHAR(26)"` // Reputation score of this instance -- cgit v1.2.3