summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatias Linares <matiaslina@gmail.com>2019-06-18 00:06:07 -0300
committerMatias Linares <matiaslina@gmail.com>2019-06-18 00:06:07 -0300
commit86d4f5b939010f716e6e0e4768e6a0da3700adfd (patch)
tree2eeafe8273d6e542361467c7a2cf95922d6afbde /lib
parenta090293f1fb64375f5ba16b6a5e53c829eb41add (diff)
downloadperl6-matrix-client-86d4f5b939010f716e6e0e4768e6a0da3700adfd.tar.gz
Add kick and forget endpoints
Diffstat (limited to 'lib')
-rw-r--r--lib/Matrix/Client.pm614
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/Matrix/Client.pm6 b/lib/Matrix/Client.pm6
index 86de2e8..6d60660 100644
--- a/lib/Matrix/Client.pm6
+++ b/lib/Matrix/Client.pm6
@@ -227,6 +227,20 @@ method invite(Str $room-id, Str $user-id) {
)
}
+#| POST - /_matrix/client/r0/rooms/{roomId}/forget
+method forget(Str $room-id) {
+ $.post("/rooms/$room-id/forget")
+}
+
+#| POST - /_matrix/client/r0/rooms/{roomId}/kick
+method kick(Str $room-id, Str $user-id, $reason = "") {
+ $.post(
+ "/rooms/$room-id/kick",
+ :$user-id,
+ :$reason
+ );
+}
+
#| POST - /_matrix/client/r0/rooms/{roomId}/leave
method leave-room($room-id) {
$.post("/rooms/$room-id/leave");