diff --git a/src/Vervis/Handler/Inbox.hs b/src/Vervis/Handler/Inbox.hs index 52c2634..368bb8e 100644 --- a/src/Vervis/Handler/Inbox.hs +++ b/src/Vervis/Handler/Inbox.hs @@ -309,7 +309,20 @@ getOutboxR :: ShrIdent -> Handler TypedContent getOutboxR = error "Not implemented yet" getOutboxItemR :: ShrIdent -> KeyHashid OutboxItem -> Handler TypedContent -getOutboxItemR = error "Not implemented yet" +getOutboxItemR shr obkhid = do + obid <- decodeKeyHashid404 obkhid + doc <- runDB $ do + sid <- getKeyBy404 $ UniqueSharer shr + pid <- getKeyBy404 $ UniquePersonIdent sid + ob <- get404 obid + unless (outboxItemPerson ob == pid) notFound + return $ persistJSONValue $ outboxItemActivity ob + selectRep $ do + provideAP $ pure doc + provideRep $ defaultLayout $ + [whamlet| +
#{AEP.encodePrettyToLazyText doc} + |] postOutboxR :: ShrIdent -> Handler Html postOutboxR shrAuthor = do