Stop decoding event contents; they seem to vary event-to-event
This commit is contained in:
parent
60bc00e9dd
commit
61121ee6f8
|
@ -26,24 +26,10 @@ eventDecoder =
|
||||||
|> required "content" value
|
|> required "content" value
|
||||||
|> required "type" string
|
|> required "type" string
|
||||||
|
|
||||||
type alias EventContent =
|
type alias EventContent = Decode.Value
|
||||||
{ avatarUrl : Maybe String
|
|
||||||
, displayname : Maybe String
|
|
||||||
, membership : String
|
|
||||||
, isDirect : Maybe Bool
|
|
||||||
-- , thirdPartyInvite : Invite
|
|
||||||
, unsigned : Maybe UnsignedData
|
|
||||||
}
|
|
||||||
|
|
||||||
eventContentDecoder : Decoder EventContent
|
eventContentDecoder : Decoder EventContent
|
||||||
eventContentDecoder =
|
eventContentDecoder = Decode.value
|
||||||
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
|
|
||||||
|
|
||||||
-- Unsigned Data
|
-- Unsigned Data
|
||||||
type alias UnsignedData =
|
type alias UnsignedData =
|
||||||
|
|
Loading…
Reference in New Issue
Block a user