diff --git a/src/Vervis/Web/Actor.hs b/src/Vervis/Web/Actor.hs index 1bfe0a9..e2306a1 100644 --- a/src/Vervis/Web/Actor.hs +++ b/src/Vervis/Web/Actor.hs @@ -65,7 +65,7 @@ import Yesod.Persist.Core import qualified Data.ByteString.Char8 as BC (unpack) import qualified Data.HashMap.Strict as M import qualified Data.Text as T -import qualified Data.Text.Lazy as TL (toStrict) +import qualified Data.Text.Lazy as TL import qualified Data.Vector as V import qualified Database.Esqueleto as E @@ -88,6 +88,8 @@ import Data.Time.Clock.Local import Database.Persist.Local import Yesod.Persist.Local +import qualified Data.Aeson.Encode.Pretty.ToEncoding as P + import Vervis.ActivityPub import Vervis.ActorKey import Vervis.API @@ -117,7 +119,10 @@ objectSummary o = objectId o = case M.lookup "id" o <|> M.lookup "@id" o of Just (String t) | not (T.null t) -> t - _ -> error "'id' field not found" + _ -> + error $ + "'id' field not found" ++ + TL.unpack (P.encodePrettyToLazyText o) getInbox here actor hash = do key <- decodeKeyHashid404 hash