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

In inbox display, show summary when available, otherwise show highlighted JSON

This commit is contained in:
fr33domlover 2019-06-29 23:16:52 +00:00
parent f7b7a417eb
commit d73c3928a0
2 changed files with 9 additions and 2 deletions
src/Vervis/Handler

View file

@ -236,6 +236,10 @@ 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