diff --git a/src/Vervis/Handler/Loom.hs b/src/Vervis/Handler/Loom.hs index 4b2614c..d1d4b50 100644 --- a/src/Vervis/Handler/Loom.hs +++ b/src/Vervis/Handler/Loom.hs @@ -91,7 +91,7 @@ getLoomR loomHash = do , AP.actorSshKeys = [] } , AP.actorDetail = AP.ActorDetail - { AP.actorType = AP.ActorTypeOther "PatchTracker" + { AP.actorType = AP.ActorTypePatchTracker , AP.actorUsername = Nothing , AP.actorName = Just $ actorName actor , AP.actorSummary = Just $ actorDesc actor diff --git a/src/Web/ActivityPub.hs b/src/Web/ActivityPub.hs index e0a1dc6..48a2a40 100644 --- a/src/Web/ActivityPub.hs +++ b/src/Web/ActivityPub.hs @@ -200,8 +200,12 @@ instance (ActivityPub a, UriMode u) => ToJSON (Doc a u) where context [t] = "@context" .= t context ts = "@context" .= ts -data ActorType = - ActorTypePerson | ActorTypeRepo | ActorTypeTicketTracker | ActorTypeOther Text +data ActorType + = ActorTypePerson + | ActorTypeRepo + | ActorTypeTicketTracker + | ActorTypePatchTracker + | ActorTypeOther Text deriving Eq instance FromJSON ActorType where @@ -211,6 +215,7 @@ instance FromJSON ActorType where | t == "Person" = ActorTypePerson | t == "Repository" = ActorTypeRepo | t == "TicketTracker" = ActorTypeTicketTracker + | t == "PatchTracker" = ActorTypePatchTracker | otherwise = ActorTypeOther t instance ToJSON ActorType where @@ -220,6 +225,7 @@ instance ToJSON ActorType where ActorTypePerson -> "Person" ActorTypeRepo -> "Repository" ActorTypeTicketTracker -> "TicketTracker" + ActorTypePatchTracker -> "PatchTracker" ActorTypeOther t -> t data Owner = OwnerInstance | OwnerActor LocalURI