aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatias Linares <matiaslina@openmailbox.org>2018-01-28 18:15:56 -0300
committerMatias Linares <matiaslina@openmailbox.org>2018-01-28 18:15:56 -0300
commit194a15d06d94e43c2d843904df7c474dbc8afb39 (patch)
treecd6a6be13a0a6c74692c1f924d44aae501871825 /lib
parentc44f123719632f295467ae1c89bb43e1d86d6221 (diff)
downloadperl6-matrix-client-194a15d06d94e43c2d843904df7c474dbc8afb39.tar.gz
Add leave-room endpoint
Diffstat (limited to 'lib')
-rw-r--r--lib/Matrix/Client.pm66
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Matrix/Client.pm6 b/lib/Matrix/Client.pm6
index 36e0bb7..51141eb 100644
--- a/lib/Matrix/Client.pm6
+++ b/lib/Matrix/Client.pm6
@@ -162,7 +162,11 @@ multi method sync(:$sync-filter is copy, :$since = "") {
# Rooms
method join-room($room-id!) {
- $.post("/join/" ~ $room-id)
+ $.post("/join/$room-id")
+}
+
+method leave-room($room-id) {
+ $.post("/rooms/$room-id/leave");
}
method rooms(Bool :$sync = False) {