Skip to content

Commit a2cfeab

Browse files
committed
trigger conversation closing
1 parent c9b7c86 commit a2cfeab

File tree

1 file changed

+4
-4
lines changed
  • libs/wire-subsystems/src/Wire/TeamCollaboratorsSubsystem

1 file changed

+4
-4
lines changed

libs/wire-subsystems/src/Wire/TeamCollaboratorsSubsystem/Interpreter.hs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,8 @@ updateTeamCollaboratorImpl ::
110110
Member (Error TeamCollaboratorsError) r,
111111
Member Store.TeamCollaboratorsStore r,
112112
Member Now r,
113-
Member NotificationSubsystem r
113+
Member NotificationSubsystem r,
114+
Member ConversationsSubsystem r
114115
) =>
115116
Local UserId ->
116117
UserId ->
@@ -120,9 +121,8 @@ updateTeamCollaboratorImpl ::
120121
updateTeamCollaboratorImpl zUser user team perms = do
121122
guardPermission (tUnqualified zUser) team TeamMember.UpdateTeamCollaborator InsufficientRights
122123
Store.updateTeamCollaborator user team perms
123-
unless (Set.member ImplicitConnection perms) $
124-
-- TODO gdf remove O2O conversations
125-
pure ()
124+
when (Set.null $ Set.intersection (Set.fromList [CreateTeamConversation, ImplicitConnection]) perms) $
125+
internalCloseConversationsFrom team user
126126

127127
now <- get
128128
let event = newEvent team now (EdCollaboratorUpdate user $ Set.toList perms)

0 commit comments

Comments
 (0)