elm-format

4-transfer-api
Bram 2024-07-24 14:05:49 +02:00
parent 61a8e18714
commit a8d879afbb
3 changed files with 7 additions and 1 deletions

View File

@ -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 =
()

View File

@ -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 : () }

View File

@ -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 :