From 9f3e45c113031cc60288a0e4caddbca7c1aa7283 Mon Sep 17 00:00:00 2001 From: fr33domlover Date: Wed, 26 Jun 2019 01:37:29 +0000 Subject: [PATCH] When Accepting an Offer{Ticket}, automatically add author as ticket follower --- src/Vervis/API.hs | 1 + src/Vervis/Federation/Ticket.hs | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Vervis/API.hs b/src/Vervis/API.hs index ada831c..8333b4c 100644 --- a/src/Vervis/API.hs +++ b/src/Vervis/API.hs @@ -672,6 +672,7 @@ offerTicketC shrUser summary audience offer@(Offer ticket uTarget) = runExceptT , ticketAuthorLocalOffer = obiid } insertMany_ $ map (TicketDependency tid) tidsDeps + insert_ $ Follow pidAuthor fsid False publishAccept pidAuthor sid jid fsid luOffer num obiid doc = do now <- liftIO getCurrentTime remotesHttp <- do diff --git a/src/Vervis/Federation/Ticket.hs b/src/Vervis/Federation/Ticket.hs index 0bec22b..d5f0095 100644 --- a/src/Vervis/Federation/Ticket.hs +++ b/src/Vervis/Federation/Ticket.hs @@ -321,6 +321,7 @@ projectOfferTicketF , ticketAuthorRemoteOffer = ractid } insertMany_ $ map (TicketDependency tid) deps + insert_ $ RemoteFollow raidAuthor fsid False return $ Just (ractid, next, obiidAccept, docAccept) deliverLocal