diff options
author | Matias Linares <matiaslina@openmailbox.org> | 2018-01-28 18:15:56 -0300 |
---|---|---|
committer | Matias Linares <matiaslina@openmailbox.org> | 2018-01-28 18:15:56 -0300 |
commit | 194a15d06d94e43c2d843904df7c474dbc8afb39 (patch) | |
tree | cd6a6be13a0a6c74692c1f924d44aae501871825 | |
parent | c44f123719632f295467ae1c89bb43e1d86d6221 (diff) | |
download | perl6-matrix-client-194a15d06d94e43c2d843904df7c474dbc8afb39.tar.gz |
Add leave-room endpoint
-rw-r--r-- | lib/Matrix/Client.pm6 | 6 |
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) { |