From d24492bf44e7a4f12b0b364ac81c6e1cd5e2d155 Mon Sep 17 00:00:00 2001 From: Pere Lev Date: Sat, 27 Apr 2024 13:20:06 +0300 Subject: [PATCH] S2S: Person: Revoke: Fix bug: Forgot to delete PermitExtendResource* --- src/Vervis/Actor/Person.hs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Vervis/Actor/Person.hs b/src/Vervis/Actor/Person.hs index dce8843..a7608b1 100644 --- a/src/Vervis/Actor/Person.hs +++ b/src/Vervis/Actor/Person.hs @@ -1235,12 +1235,16 @@ personRevoke now recipPersonID (Verse authorIdMsig body) (AP.Revoke lus) = do let extendIDs = map (permitTopicExtendLocalPermit . entityVal) extends extendLocalIDs = map entityKey extends deleteWhere [PermitTopicExtendLocalId <-. extendLocalIDs] + deleteWhere [PermitTopicExtendResourceLocalPermit <-. extendIDs] + deleteWhere [PermitTopicExtendResourceRemotePermit <-. extendIDs] deleteWhere [PermitTopicExtendId <-. extendIDs] Right (_, enableID) -> do extends <- selectList [PermitTopicExtendRemoteTopic ==. enableID] [] let extendIDs = map (permitTopicExtendRemotePermit . entityVal) extends extendRemoteIDs = map entityKey extends deleteWhere [PermitTopicExtendRemoteId <-. extendRemoteIDs] + deleteWhere [PermitTopicExtendResourceLocalPermit <-. extendIDs] + deleteWhere [PermitTopicExtendResourceRemotePermit <-. extendIDs] deleteWhere [PermitTopicExtendId <-. extendIDs] deleteBy $ UniquePermitPersonSendDelegator gestureID case topicAndEnable of @@ -1267,6 +1271,8 @@ personRevoke now recipPersonID (Verse authorIdMsig body) (AP.Revoke lus) = do case extend of Left k -> delete k Right k -> delete k + deleteBy $ UniquePermitTopicExtendResourceLocal extendID + deleteBy $ UniquePermitTopicExtendResourceRemote extendID delete extendID )