1
0
Fork 0
mirror of https://code.sup39.dev/repos/Wqawg synced 2025-03-20 04:46:22 +09:00

Display summary and pretty JSON for notifications and for outboxes

This commit is contained in:
fr33domlover 2019-06-30 01:41:54 +00:00
parent 2109974709
commit d8da1f2abf
3 changed files with 17 additions and 8 deletions
src/Vervis/Handler

View file

@ -127,6 +127,11 @@ import Vervis.RemoteActorStore
import Yesod.RenderSource
import Vervis.Settings
objectSummary o =
case M.lookup "summary" o of
Just (String t) | not (T.null t) -> Just t
_ -> Nothing
getInboxR :: Handler Html
getInboxR = do
acts <-
@ -236,10 +241,6 @@ getInbox here getInboxId = do
error $ "InboxItem #" ++ show ibid ++ " both local and remote"
(Just act, Nothing) -> persistJSONObject act
(Nothing, Just obj) -> persistJSONObject obj
objectSummary o =
case M.lookup "summary" o of
Just (String t) | not (T.null t) -> Just t
_ -> Nothing
getSharerInboxR :: ShrIdent -> Handler TypedContent
getSharerInboxR shr = getInbox here getInboxId