diff --git a/src/Vervis/Client.hs b/src/Vervis/Client.hs index c17fe8f..d8a4130 100644 --- a/src/Vervis/Client.hs +++ b/src/Vervis/Client.hs @@ -368,11 +368,12 @@ offerIssue senderHash title desc uTracker = do return (Nothing, audience, ticket) resolve - :: KeyHashid Person + :: PersonId -> FedURI -> ExceptT Text Handler (Maybe HTML, [Aud URIMode], AP.Resolve URIMode) -resolve senderHash uObject = do +resolve senderID uObject = do + senderHash <- encodeKeyHashid senderID encodeRouteHome <- getEncodeRouteHome (uTracker, audFollowers) <- do routeOrRemote <- parseFedURIOld uObject diff --git a/src/Vervis/Foundation.hs b/src/Vervis/Foundation.hs index 291f812..4963e87 100644 --- a/src/Vervis/Foundation.hs +++ b/src/Vervis/Foundation.hs @@ -854,6 +854,7 @@ instance YesodBreadcrumbs App where PublishMergeR -> ("Apply MR", Just HomeR) PublishInviteR -> ("Invite someone to a resource", Just HomeR) PublishRemoveR -> ("Remove someone from a resource", Just HomeR) + PublishResolveR -> ("Close a ticket", Just HomeR) PersonR p -> ("Person ~" <> keyHashidText p, Just HomeR) PersonInboxR p -> ("Inbox", Just $ PersonR p) diff --git a/src/Vervis/Handler/Client.hs b/src/Vervis/Handler/Client.hs index ebc524c..26fe558 100644 --- a/src/Vervis/Handler/Client.hs +++ b/src/Vervis/Handler/Client.hs @@ -41,6 +41,9 @@ module Vervis.Handler.Client , getPublishRemoveR , postPublishRemoveR + + , getPublishResolveR + , postPublishResolveR ) where @@ -1268,3 +1271,42 @@ postPublishRemoveR = do Right _ -> do setMessage "Remove activity sent" redirect HomeR + +resolveForm = renderDivs $ (,) + <$> areq fedUriField "(URI) Ticket to close" Nothing + <*> areq capField "(URI) Grant activity to use for authorization" Nothing + +getPublishResolveR :: Handler Html +getPublishResolveR = do + ((_, widget), enctype) <- runFormPost resolveForm + defaultLayout + [whamlet| +