From d80afd8a49f552c5dc51d8346d40809298fef11f Mon Sep 17 00:00:00 2001 From: KushBlazingJudah <59340248+KushBlazingJudah@users.noreply.github.com> Date: Tue, 2 Nov 2021 15:06:42 -0300 Subject: db package now compiles without error for now --- db/cache.go | 6 +++++- db/database.go | 3 ++- db/follow.go | 5 ++++- 3 files changed, 11 insertions(+), 3 deletions(-) (limited to 'db') diff --git a/db/cache.go b/db/cache.go index 0831f02..6f1ee8f 100644 --- a/db/cache.go +++ b/db/cache.go @@ -290,7 +290,11 @@ func WriteActorToCache(actorID string) error { if err != nil { return err } - collection := GetActorCollection(actor.Outbox) + + collection, err := webfinger.GetActorCollection(actor.Outbox) + if err != nil { + return err + } for _, e := range collection.OrderedItems { if _, err := WriteActorObjectToCache(e); err != nil { diff --git a/db/database.go b/db/database.go index 8bb7568..559188b 100644 --- a/db/database.go +++ b/db/database.go @@ -14,6 +14,7 @@ import ( "github.com/FChannel0/FChannel-Server/activitypub" "github.com/FChannel0/FChannel-Server/config" "github.com/FChannel0/FChannel-Server/util" + "github.com/FChannel0/FChannel-Server/webfinger" _ "github.com/lib/pq" ) @@ -2316,7 +2317,7 @@ func GetObjectTypeDB(id string) (string, error) { } func IsReplyInThread(inReplyTo string, id string) (bool, error) { - obj, _, err := CheckValidActivity(inReplyTo) + obj, _, err := webfinger.CheckValidActivity(inReplyTo) if err != nil { return false, err } diff --git a/db/follow.go b/db/follow.go index 386de2b..0919e30 100644 --- a/db/follow.go +++ b/db/follow.go @@ -262,7 +262,10 @@ func SetActorFollowingDB(activity activitypub.Activity) (activitypub.Activity, e return activity, err } - remoteActorFollowerCol := GetCollectionFromReq(actor.Followers) + remoteActorFollowerCol, err := webfinger.GetCollectionFromReq(actor.Followers) + if err != nil { + return activity, err + } for _, e := range following { if e.Id == activity.Actor.Id { -- cgit v1.2.3