Stop decoding event contents; they seem to vary event-to-event

This commit is contained in:
Danila Fedorin 2019-08-21 18:21:46 -07:00
parent 60bc00e9dd
commit 61121ee6f8
1 changed files with 2 additions and 16 deletions

View File

@ -26,24 +26,10 @@ eventDecoder =
|> required "content" value
|> required "type" string
type alias EventContent =
{ avatarUrl : Maybe String
, displayname : Maybe String
, membership : String
, isDirect : Maybe Bool
-- , thirdPartyInvite : Invite
, unsigned : Maybe UnsignedData
}
type alias EventContent = Decode.Value
eventContentDecoder : Decoder EventContent
eventContentDecoder =
Decode.succeed EventContent
|> maybeDecode "avatar_url" string
|> maybeDecode "displayname" string
|> required "membership" string
|> maybeDecode "is_direct" bool
-- |> required "third_party_invite" inviteDecoder
|> maybeDecode "unsigned" unsignedDataDecoder
eventContentDecoder = Decode.value
-- Unsigned Data
type alias UnsignedData =