From 8d28fe63b94c1fb0770c86e4f537d0b4e658f1db Mon Sep 17 00:00:00 2001 From: Bram Date: Thu, 25 Jul 2024 19:15:30 +0200 Subject: [PATCH] Fix bugs --- src/Internal/Api/InviteUser/Api.elm | 3 ++- src/Matrix/Room.elm | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Internal/Api/InviteUser/Api.elm b/src/Internal/Api/InviteUser/Api.elm index 3b9efe8..b70b457 100644 --- a/src/Internal/Api/InviteUser/Api.elm +++ b/src/Internal/Api/InviteUser/Api.elm @@ -107,7 +107,8 @@ inviteV2 : InviteInputV2 a -> A.TaskChain (PhantomV1 ph1) (PhantomV1 ph1) inviteV2 { reason, roomId, user } = A.request { attributes = - [ R.bodyOpString "reason" reason + [ R.accessToken + , R.bodyOpString "reason" reason , R.bodyString "user_id" (User.toString user) , R.onStatusCode 400 "M_UNKNOWN" , R.onStatusCode 403 "M_FORBIDDEN" diff --git a/src/Matrix/Room.elm b/src/Matrix/Room.elm index 6cf5d5f..a1f3696 100644 --- a/src/Matrix/Room.elm +++ b/src/Matrix/Room.elm @@ -79,7 +79,7 @@ ban : ban data = case ( data.room, data.user ) of ( Room room, Types.User user ) -> - Api.kickUser room + Api.banUser room { reason = data.reason , roomId = roomId data.room , toMsg = Types.VaultUpdate >> data.toMsg