DB: Remove the "manual" fields from follow records

Follows used to be added automatically, without a Follow activity sent by the
client. They aren't added automatically anymore, so there's no need for those
"manual" boolean fields.
This commit is contained in:
fr33domlover 2019-10-22 10:25:33 +00:00
parent 9ec4142737
commit 0673ed0bb4
4 changed files with 6 additions and 4 deletions

View file

@ -176,7 +176,6 @@ FollowerSet
Follow
person PersonId
target FollowerSetId
manual Bool
public Bool
follow OutboxItemId
accept OutboxItemId
@ -188,7 +187,6 @@ Follow
RemoteFollow
actor RemoteActorId
target FollowerSetId
manual Bool
public Bool
follow RemoteActivityId
accept OutboxItemId

View file

@ -576,7 +576,7 @@ followC shrUser summary audience follow@(AP.Follow uObject muContext hide) = run
return (obiid, doc, luAct)
deliverFollowLocal pidAuthor fsid unread obiidF obiidA ibidRecip = do
insert_ $ Follow pidAuthor fsid True (not hide) obiidF obiidA
insert_ $ Follow pidAuthor fsid (not hide) obiidF obiidA
ibiid <- insert $ InboxItem unread
insert_ $ InboxItemLocal ibidRecip obiidF ibiid

View file

@ -283,7 +283,7 @@ followF
insertFollow ractid obiidA fsid = do
let raid = remoteAuthorId author
mrfid <- insertUnique $ RemoteFollow raid fsid True (not hide) ractid obiidA
mrfid <- insertUnique $ RemoteFollow raid fsid (not hide) ractid obiidA
return $ isJust mrfid
insertAcceptToOutbox ra luFollow obidRecip = do

View file

@ -1087,6 +1087,10 @@ changes hLocal ctx =
, addFieldRefRequiredEmpty "RemoteFollow" "accept" "OutboxItem"
-- 148
, addUnique "RemoteFollow" $ Unique "UniqueRemoteFollowAccept" ["accept"]
-- 149
, removeField "Follow" "manual"
-- 150
, removeField "RemoteFollow" "manual"
]
migrateDB