mirror of
https://code.sup39.dev/repos/Wqawg
synced 2024-12-27 17:24:53 +09:00
Specify visibility in Follow records
This commit is contained in:
parent
68e8b094a0
commit
544ebae3fd
5 changed files with 10 additions and 4 deletions
|
@ -155,6 +155,7 @@ Follow
|
|||
person PersonId
|
||||
target FollowerSetId
|
||||
manual Bool
|
||||
public Bool
|
||||
|
||||
UniqueFollow person target
|
||||
|
||||
|
@ -162,6 +163,7 @@ RemoteFollow
|
|||
actor RemoteActorId
|
||||
target FollowerSetId
|
||||
manual Bool
|
||||
public Bool
|
||||
|
||||
UniqueRemoteFollow actor target
|
||||
|
||||
|
|
|
@ -181,7 +181,7 @@ createNoteC host (Note mluNote luAttrib aud muParent muContext mpublished source
|
|||
unless (messageRoot m == did) $
|
||||
throwE "Remote parent belongs to a different discussion"
|
||||
return mid
|
||||
lift $ insertUnique_ $ Follow pid (ticketFollowers t) False
|
||||
lift $ insertUnique_ $ Follow pid (ticketFollowers t) False True
|
||||
return (did, Left <$> mmidParent, Just (sid, ticketFollowers t, ibidProject, fsidProject))
|
||||
Nothing -> do
|
||||
(rd, rdnew) <- lift $ do
|
||||
|
@ -671,7 +671,7 @@ offerTicketC shrUser summary audience offer@(Offer ticket uTarget) = runExceptT
|
|||
, ticketAuthorLocalOffer = obiid
|
||||
}
|
||||
--insertMany_ $ map (TicketDependency tid) tidsDeps
|
||||
insert_ $ Follow pidAuthor fsid False
|
||||
insert_ $ Follow pidAuthor fsid False True
|
||||
publishAccept pidAuthor sid jid fsid luOffer num obiid doc = do
|
||||
now <- liftIO getCurrentTime
|
||||
let dont = Authority "dont-do.any-forwarding" Nothing
|
||||
|
|
|
@ -318,7 +318,7 @@ projectCreateNoteF now shrRecip prjRecip author body (Note mluNote _ _ muParent
|
|||
delete mid
|
||||
return Nothing
|
||||
Just _ -> do
|
||||
insertUnique_ $ RemoteFollow raidAuthor fsid False
|
||||
insertUnique_ $ RemoteFollow raidAuthor fsid False True
|
||||
ibiid <- insert $ InboxItem False
|
||||
insert_ $ InboxItemRemote ibid ractid ibiid
|
||||
return $ Just (ractid, mid)
|
||||
|
|
|
@ -326,7 +326,7 @@ projectOfferTicketF
|
|||
, ticketAuthorRemoteOffer = ractid
|
||||
}
|
||||
-- insertMany_ $ map (TicketDependency tid) deps
|
||||
insert_ $ RemoteFollow raidAuthor fsid False
|
||||
insert_ $ RemoteFollow raidAuthor fsid False True
|
||||
return $ Just (ractid, next, obiidAccept, docAccept)
|
||||
|
||||
deliverLocal
|
||||
|
|
|
@ -1050,6 +1050,10 @@ changes hLocal ctx =
|
|||
"FollowerSet"
|
||||
-- 135
|
||||
, addUnique "Person" $ Unique "UniquePersonFollowers" ["followers"]
|
||||
-- 136
|
||||
, addFieldPrimRequired "Follow" True "public"
|
||||
-- 137
|
||||
, addFieldPrimRequired "RemoteFollow" True "public"
|
||||
]
|
||||
|
||||
migrateDB
|
||||
|
|
Loading…
Reference in a new issue