diff --git a/src/Vervis/Handler/Inbox.hs b/src/Vervis/Handler/Inbox.hs
index 952eb74..85d3261 100644
--- a/src/Vervis/Handler/Inbox.hs
+++ b/src/Vervis/Handler/Inbox.hs
@@ -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
diff --git a/templates/person/notifications.hamlet b/templates/person/notifications.hamlet
index e6e83e0..cc9bdc6 100644
--- a/templates/person/notifications.hamlet
+++ b/templates/person/notifications.hamlet
@@ -17,9 +17,12 @@ $#
- #{TLB.toLazyText $ encodePrettyToTextBuilder activity} + $forall (obj, widget, enctype) <- notifications + $maybe summary <- objectSummary obj ++ ^{preEscapedToHtml summary} + $nothing + ^{renderPrettyJSONSkylighting obj}