From ab4379e89720635801baccad07dfa1a16abab0cc Mon Sep 17 00:00:00 2001 From: Bram Date: Fri, 3 Nov 2023 07:00:52 +0100 Subject: [PATCH] Proper format before refactor The point of this refactor is to simplify the HTTP Task build process. This makes it easier to build more implementations on top later in the development, and it improves the code base's vocabulary. Currently, a lot of the Elm types have names like 'Snackbar' or 'Context' and they're even threatening to devolve into terms like 'Vnackbar'. Hopefully, many of these types should either be removed or gain renewed names. --- src/Internal/Api/GetEvent/Api.elm | 1 + src/Matrix/Room.elm | 1 + 2 files changed, 2 insertions(+) diff --git a/src/Internal/Api/GetEvent/Api.elm b/src/Internal/Api/GetEvent/Api.elm index 5b7904f..2092d1e 100644 --- a/src/Internal/Api/GetEvent/Api.elm +++ b/src/Internal/Api/GetEvent/Api.elm @@ -29,6 +29,7 @@ getEventInputV1 data context = ] |> R.toTask SO1.clientEventDecoder + getEventInputV2 : GetEventInputV1 -> Context { a | accessToken : (), baseUrl : (), sentEvent : () } -> Task X.Error GetEventOutputV1 getEventInputV2 data context = context diff --git a/src/Matrix/Room.elm b/src/Matrix/Room.elm index 1c9bcac..1c6c451 100644 --- a/src/Matrix/Room.elm +++ b/src/Matrix/Room.elm @@ -230,6 +230,7 @@ Keep in mind that this function is not safe to use if you're sending exactly the -- NOT SAFE Cmd.batch [ sendOneEvent data , sendOneEvent data ] + -} sendOneEvent : { content : D.Value, eventType : String, room : Room, stateKey : Maybe String, onResponse : VaultUpdate -> msg } -> Cmd msg sendOneEvent =