diff --git a/config/routes b/config/routes index 452369f..72c8201 100644 --- a/config/routes +++ b/config/routes @@ -25,7 +25,7 @@ -- ---------------------------------------------------------------------------- /publish PublishR GET -/inbox InboxR GET POST +/inbox InboxR GET /akey1 ActorKey1R GET /akey2 ActorKey2R GET @@ -50,6 +50,7 @@ /s SharersR GET /s/#ShrIdent SharerR GET +/s/#ShrIdent/inbox SharerInboxR GET POST /s/#ShrIdent/outbox OutboxR GET POST /s/#ShrIdent/outbox/#OutboxItemKeyHashid OutboxItemR GET @@ -91,6 +92,7 @@ /s/#ShrIdent/p ProjectsR GET POST /s/#ShrIdent/p/!new ProjectNewR GET /s/#ShrIdent/p/#PrjIdent ProjectR GET PUT POST +/s/#ShrIdent/p/#PrjIdent/inbox ProjectInboxR GET POST /s/#ShrIdent/p/#PrjIdent/edit ProjectEditR GET /s/#ShrIdent/p/#PrjIdent/d ProjectDevsR GET POST /s/#ShrIdent/p/#PrjIdent/d/!new ProjectDevNewR GET diff --git a/src/Vervis/Foundation.hs b/src/Vervis/Foundation.hs index 7d8db78..f59d5b1 100644 --- a/src/Vervis/Foundation.hs +++ b/src/Vervis/Foundation.hs @@ -178,7 +178,8 @@ instance Yesod App where handler (getCurrentRoute >>= \ mr -> case mr of Nothing -> return False - Just InboxR -> return False + Just (SharerInboxR _) -> return False + Just (ProjectInboxR _ _) -> return False Just (GitUploadRequestR _ _) -> return False Just r -> isWriteRequest r ) @@ -803,6 +804,7 @@ instance YesodBreadcrumbs App where SharersR -> ("Sharers", Just HomeR) SharerR shar -> (shr2text shar, Just SharersR) + SharerInboxR shr -> ("Inbox", Just $ SharerR shr) PeopleR -> ("People", Just HomeR) @@ -871,6 +873,7 @@ instance YesodBreadcrumbs App where ProjectR shar proj -> ( prj2text proj , Just $ ProjectsR shar ) + ProjectInboxR shr prj -> ("Inbox", Just $ ProjectR shr prj) ProjectEditR shr prj -> ("Edit", Just $ ProjectR shr prj) ProjectDevsR shr prj -> ( "Collaborators" , Just $ ProjectR shr prj diff --git a/src/Vervis/Handler/Inbox.hs b/src/Vervis/Handler/Inbox.hs index 95436dc..74378bb 100644 --- a/src/Vervis/Handler/Inbox.hs +++ b/src/Vervis/Handler/Inbox.hs @@ -15,7 +15,10 @@ module Vervis.Handler.Inbox ( getInboxR - , postInboxR + , getSharerInboxR + , getProjectInboxR + , postSharerInboxR + , postProjectInboxR , getPublishR , getOutboxR , getOutboxItemR @@ -104,12 +107,14 @@ getInboxR = do defaultLayout [whamlet|
- Welcome to the ActivityPub inbox test page! It's the beginning of - federation support in Vervis. Currently POSTing activities - doesn't do anything, they're just verified and the results are - displayed on this page. To test, go to another Vervis instance's - outbox page, submit an activity, and come back here to see - results. + Welcome to the ActivityPub inbox test page! Activities received + by this Vervis instance are listed here for testing and + debugging. To test, go to another Vervis instance and publish + something that supports federation (currently, only ticket + comments), either through the regular UI or via the /publish + page, and then come back here to see the result. Activities that + aren't understood or their processing fails get listed here too, + with a report of what exactly happened.
Last 10 activities posted: