From 61121ee6f85e389e0d3bb74646405155b71812f2 Mon Sep 17 00:00:00 2001 From: Danila Fedorin Date: Wed, 21 Aug 2019 18:21:46 -0700 Subject: [PATCH] Stop decoding event contents; they seem to vary event-to-event --- src/Scylla/Sync.elm | 18 ++---------------- 1 file changed, 2 insertions(+), 16 deletions(-) diff --git a/src/Scylla/Sync.elm b/src/Scylla/Sync.elm index ba54d77..f971406 100644 --- a/src/Scylla/Sync.elm +++ b/src/Scylla/Sync.elm @@ -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 =