Skip to content

Commit 7f392b3

Browse files
authored
Handle missing supported protocols in mls-users (#5190)
1 parent 5b57aa8 commit 7f392b3

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix bug where the mls-users tool would crash for users with null `supported_protocols`

tools/db/mls-users/src/MlsUsers/Lib.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ getUserResult logger brigClient ur = do
4242
andM
4343
[ pure ur.activated,
4444
pure $ ur.status == Just Active,
45-
pure $ Set.notMember BaseProtocolMLSTag ur.supportedProtocols,
45+
pure $ Set.notMember BaseProtocolMLSTag (fold ur.supportedProtocols),
4646
-- check that the user has at least one active client
4747
do
4848
now <- getCurrentTime

tools/db/mls-users/src/MlsUsers/Types.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ data UserRow = UserRow
3636
{ userId :: UserId,
3737
activated :: Bool,
3838
status :: Maybe AccountStatus,
39-
supportedProtocols :: Set BaseProtocolTag
39+
supportedProtocols :: Maybe (Set BaseProtocolTag)
4040
}
4141
deriving (Generic)
4242

0 commit comments

Comments
 (0)