diff --git a/config/routes b/config/routes index 533ab2c..80e1b36 100644 --- a/config/routes +++ b/config/routes @@ -54,8 +54,8 @@ /s/#ShrIdent SharerR GET /s/#ShrIdent/inbox SharerInboxR GET POST /s/#ShrIdent/notifications NotificationsR GET POST -/s/#ShrIdent/outbox OutboxR GET POST -/s/#ShrIdent/outbox/#OutboxItemKeyHashid OutboxItemR GET +/s/#ShrIdent/outbox SharerOutboxR GET POST +/s/#ShrIdent/outbox/#OutboxItemKeyHashid SharerOutboxItemR GET /p PeopleR GET diff --git a/src/Vervis/API.hs b/src/Vervis/API.hs index c7ebd75..0b5f1c8 100644 --- a/src/Vervis/API.hs +++ b/src/Vervis/API.hs @@ -475,7 +475,7 @@ createNoteC host (Note mluNote luAttrib aud muParent muContext mpublished source route2local <- getEncodeRouteLocal obihid <- encodeKeyHashid obiid lmhid <- encodeKeyHashid lmid - let luAct = route2local $ OutboxItemR shrUser obihid + let luAct = route2local $ SharerOutboxItemR shrUser obihid luNote = route2local $ MessageR shrUser lmhid doc = activity luAct luNote update obiid [OutboxItemActivity =. PersistJSON doc] diff --git a/src/Vervis/Federation.hs b/src/Vervis/Federation.hs index 39f91a8..eaab436 100644 --- a/src/Vervis/Federation.hs +++ b/src/Vervis/Federation.hs @@ -416,7 +416,7 @@ handleSharerInbox _now shrRecip (Left pidAuthor) _raw activity = do Nothing -> throwE "Local activity: Not a valid route" Just r -> return r case route of - OutboxItemR shr obikhid -> + SharerOutboxItemR shr obikhid -> (shr,) <$> decodeKeyHashidE obikhid "Local activity: ID is invalid hashid" _ -> throwE "Local activity: Not an activity route" runDBExcept $ do diff --git a/src/Vervis/Foundation.hs b/src/Vervis/Foundation.hs index 26d573e..aefd656 100644 --- a/src/Vervis/Foundation.hs +++ b/src/Vervis/Foundation.hs @@ -284,7 +284,7 @@ instance Yesod App where (SharerInboxR shr , False) -> person shr (NotificationsR shr , _ ) -> person shr - (OutboxR shr , True) -> person shr + (SharerOutboxR shr , True) -> person shr (GroupsR , True) -> personAny (GroupNewR , _ ) -> personAny @@ -720,9 +720,9 @@ instance YesodBreadcrumbs App where PublishR -> ("Publish", Just HomeR) InboxR -> ("Inbox", Just HomeR) - OutboxR shr -> ("Outbox", Just $ SharerR shr) - OutboxItemR shr hid -> ( "#" <> keyHashidText hid - , Just $ OutboxR shr + SharerOutboxR shr -> ("Outbox", Just $ SharerR shr) + SharerOutboxItemR shr hid -> ( "#" <> keyHashidText hid + , Just $ SharerOutboxR shr ) ActorKey1R -> ("Actor Key 1", Nothing) ActorKey2R -> ("Actor Key 2", Nothing) diff --git a/src/Vervis/Handler/Inbox.hs b/src/Vervis/Handler/Inbox.hs index 259b14b..34c172a 100644 --- a/src/Vervis/Handler/Inbox.hs +++ b/src/Vervis/Handler/Inbox.hs @@ -20,9 +20,9 @@ module Vervis.Handler.Inbox , postSharerInboxR , postProjectInboxR , getPublishR - , getOutboxR - , getOutboxItemR - , postOutboxR + , getSharerOutboxR + , getSharerOutboxItemR + , postSharerOutboxR , getActorKey1R , getActorKey2R , getNotificationsR @@ -349,7 +349,7 @@ activityWidget shr widget enctype = This is a federation test page. Provide a recepient actor URI and message text, and a Create activity creating a new Note will be sent to the destination server. -