mirror of
https://github.com/correl/planning-poker.git
synced 2024-11-15 03:00:18 +00:00
Allow for null names in presence events
Leave events may leave the presence metadata fields null, including name. Fall back on an empty string if that is the case.
This commit is contained in:
parent
1e9080e7c1
commit
129f249ca2
1 changed files with 5 additions and 1 deletions
|
@ -514,7 +514,11 @@ playersDecoder =
|
|||
let
|
||||
presence =
|
||||
Decode.map2 (Player Participant)
|
||||
(Decode.field "name" Decode.string)
|
||||
(Decode.field "name"
|
||||
(Decode.nullable Decode.string
|
||||
|> Decode.map (Maybe.withDefault "")
|
||||
)
|
||||
)
|
||||
(Decode.field "vote" (Decode.nullable Decode.string))
|
||||
in
|
||||
Decode.dict presence
|
||||
|
|
Loading…
Reference in a new issue