aboutsummaryrefslogtreecommitdiff
path: root/lib/Matrix/Client/Room.rakumod
diff options
context:
space:
mode:
authorMatias Linares <matiaslina@gmail.com>2021-07-08 17:22:38 -0300
committerMatias Linares <matiaslina@gmail.com>2021-07-08 17:25:36 -0300
commit7e3b798983fa11352fb19fe382b7a1217c8dbce3 (patch)
treeda2e85b2ea56374f6babd3c2d27573dd02ba7387 /lib/Matrix/Client/Room.rakumod
parent46f9a0d6c1b55413c9cf097a12b7434bbe8e6336 (diff)
downloadperl6-matrix-client-7e3b798983fa11352fb19fe382b7a1217c8dbce3.tar.gz
Fix params with dashes
Couple of endpoints were passing parameters with dash on the JSON body intead of an underscore. This fixes he following methods: - ban - unban - invite - kick
Diffstat (limited to 'lib/Matrix/Client/Room.rakumod')
-rw-r--r--lib/Matrix/Client/Room.rakumod6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Matrix/Client/Room.rakumod b/lib/Matrix/Client/Room.rakumod
index 1a6908f..8b86108 100644
--- a/lib/Matrix/Client/Room.rakumod
+++ b/lib/Matrix/Client/Room.rakumod
@@ -191,19 +191,19 @@ method forget {
#| POST - /_matrix/client/r0/rooms/{roomId}/kick
method kick(Str $user-id, Str $reason = "") {
- $.post('/kick', :$user-id, :$reason)
+ $.post('/kick', :user_id($user-id), :$reason)
}
## Banning users
#| POST - /_matrix/client/r0/rooms/{roomId}/ban
method ban(Str $user-id, $reason = "") {
- $.post('/ban', :$user-id, :$reason)
+ $.post('/ban', :user_id($user-id), :$reason)
}
#| POST - /_matrix/client/r0/rooms/{roomId}/unban
method unban(Str $user-id) {
- $.post('/unban', :$user-id)
+ $.post('/unban', :user_id($user-id))
}
method Str(--> Str) {