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