From a8d879afbb8f3c6e9954b0c1477a4b5aa65605e8 Mon Sep 17 00:00:00 2001 From: Bram Date: Wed, 24 Jul 2024 14:05:49 +0200 Subject: [PATCH] elm-format --- src/Internal/Api/BanUser/Api.elm | 2 +- src/Internal/Api/Task.elm | 2 ++ src/Matrix/Room.elm | 4 ++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Internal/Api/BanUser/Api.elm b/src/Internal/Api/BanUser/Api.elm index df06bf2..e187014 100644 --- a/src/Internal/Api/BanUser/Api.elm +++ b/src/Internal/Api/BanUser/Api.elm @@ -2,6 +2,7 @@ module Internal.Api.BanUser.Api exposing (Phantom, banUser) {-| + # Ban user This module helps to ban users from a room. @@ -66,7 +67,6 @@ type alias BanUserInputV1 a = { a | reason : Maybe String, roomId : String, user : User } - type alias BanUserOutputV1 = () diff --git a/src/Internal/Api/Task.elm b/src/Internal/Api/Task.elm index 7e0e189..76e27bb 100644 --- a/src/Internal/Api/Task.elm +++ b/src/Internal/Api/Task.elm @@ -71,6 +71,7 @@ complete Task type. type alias UFTask a b = C.TaskChain Request.Error (EnvelopeUpdate VaultUpdate) a b + {-| Ban a user from a room. -} banUser : { reason : Maybe String, roomId : String, user : User } -> Task @@ -79,6 +80,7 @@ banUser input = |> C.andThen (Internal.Api.BanUser.Api.banUser input) |> finishTask + {-| Get an access token to talk to the Matrix API -} getAccessToken : UFTask { a | baseUrl : (), now : (), versions : () } { a | accessToken : (), baseUrl : (), now : (), versions : () } diff --git a/src/Matrix/Room.elm b/src/Matrix/Room.elm index 5faa250..6cf5d5f 100644 --- a/src/Matrix/Room.elm +++ b/src/Matrix/Room.elm @@ -47,6 +47,7 @@ you like. To help other users with decoding your JSON objects, you pass an @docs inviteUser, sendMessageEvent, sendStateEvent + ## Moderating users @docs invite, kick, ban @@ -65,6 +66,7 @@ import Types exposing (Room(..)) type alias Room = Types.Room + {-| Ban a user from a room. -} ban : @@ -84,6 +86,7 @@ ban data = , user = Envelope.getContent user } + {-| Get a piece of account data linked to a certain string key. -} getAccountData : String -> Room -> Maybe E.Value @@ -110,6 +113,7 @@ invite data = , user = Envelope.getContent user } + {-| Kick a user from a room. -} kick :