diff options
author | FChannel <> | 2022-05-07 15:11:35 -0700 |
---|---|---|
committer | FChannel <> | 2022-06-19 12:53:29 -0700 |
commit | 3c5eebf6275e6d202f8a7b7f027aabcda5c1f332 (patch) | |
tree | 5fa2d82f9375ac49be357f0f8b70db06d5c97305 /routes/actor.go | |
parent | 39012c6b17073f6933a5ead8beed64df555f7348 (diff) |
more organizing structs to have object functions
need to fully test to be sure nothing broke with changes
Diffstat (limited to 'routes/actor.go')
-rw-r--r-- | routes/actor.go | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/routes/actor.go b/routes/actor.go index ea8656f..86a5fb9 100644 --- a/routes/actor.go +++ b/routes/actor.go @@ -43,7 +43,7 @@ func ActorInbox(ctx *fiber.Ctx) error { for _, e := range activity.To { if res, err := activitypub.IsActorLocal(e); err == nil && res { if res, err := activitypub.IsActorLocal(activity.Actor.Id); err == nil && res { - col, err := activitypub.GetCollectionFromID(activity.Object.Id) + col, err := activity.Object.GetCollection() if err != nil { return err } @@ -52,7 +52,7 @@ func ActorInbox(ctx *fiber.Ctx) error { break } - if _, err := activitypub.WriteObjectToCache(*activity.Object); err != nil { + if err := activity.Object.WriteCache(); err != nil { return err } @@ -84,15 +84,15 @@ func ActorInbox(ctx *fiber.Ctx) error { } if actor.Id != "" && actor.Id != config.Domain { - if activity.Object.Replies != nil { + if activity.Object.Replies.OrderedItems != nil { for _, k := range activity.Object.Replies.OrderedItems { - if err := activitypub.TombstoneObject(k.Id); err != nil { + if err := k.Tombstone(); err != nil { return err } } } - if err := activitypub.TombstoneObject(activity.Object.Id); err != nil { + if err := activity.Object.Tombstone(); err != nil { return err } if err := actor.UnArchiveLast(); err != nil { |