Skip to content

Commit ae16812

Browse files
committed
trigger conversation closing
1 parent b42e024 commit ae16812

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
@@ -102,7 +102,8 @@ updateTeamCollaboratorImpl ::
102102
Member (Error TeamCollaboratorsError) r,
103103
Member Store.TeamCollaboratorsStore r,
104104
Member Now r,
105-
Member NotificationSubsystem r
105+
Member NotificationSubsystem r,
106+
Member ConversationsSubsystem r
106107
) =>
107108
Local UserId ->
108109
UserId ->
@@ -112,9 +113,8 @@ updateTeamCollaboratorImpl ::
112113
updateTeamCollaboratorImpl zUser user team perms = do
113114
guardPermission (tUnqualified zUser) team TeamMember.UpdateTeamCollaborator InsufficientRights
114115
Store.updateTeamCollaborator user team perms
115-
unless (Set.member ImplicitConnection perms) $
116-
-- TODO gdf remove O2O conversations
117-
pure ()
116+
when (Set.null $ Set.intersection (Set.fromList [CreateTeamConversation, ImplicitConnection]) perms) $
117+
internalCloseConversationsFrom team user
118118

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

0 commit comments

Comments
 (0)