diff --git a/src/Yesod/ActivityPub.hs b/src/Yesod/ActivityPub.hs index 9cb12a6..10ebc12 100644 --- a/src/Yesod/ActivityPub.hs +++ b/src/Yesod/ActivityPub.hs @@ -32,6 +32,8 @@ import Data.Aeson import Data.Aeson.Encode.Pretty import Data.ByteString (ByteString) import Data.Foldable +import Data.Function +import Data.List import Data.List.NonEmpty (NonEmpty) import Data.Text (Text) import Network.HTTP.Client @@ -210,6 +212,17 @@ provideHtmlAndAP' host object widget = selectRep $ do if sky then renderPrettyJSONSkylighting doc else renderPrettyJSON doc + mroute <- getCurrentRoute + for_ mroute $ \ route -> do + params <- reqGetParams <$> getRequest + let params' = + delete' "prettyjson" $ + delete' "highlight" params + [whamlet| +