diff --git a/src/Vervis/Handler/Inbox.hs b/src/Vervis/Handler/Inbox.hs index 5dd5964..952eb74 100644 --- a/src/Vervis/Handler/Inbox.hs +++ b/src/Vervis/Handler/Inbox.hs @@ -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 diff --git a/templates/person/inbox.hamlet b/templates/person/inbox.hamlet index 6723406..c418648 100644 --- a/templates/person/inbox.hamlet +++ b/templates/person/inbox.hamlet @@ -21,7 +21,10 @@ $# .
$forall obj <- items -
-      #{TLB.toLazyText $ encodePrettyToTextBuilder obj}
+    $maybe summary <- objectSummary obj
+      
+ ^{preEscapedToHtml summary} + $nothing + ^{renderPrettyJSONSkylighting obj} ^{pageNav}