From 194a15d06d94e43c2d843904df7c474dbc8afb39 Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Sun, 28 Jan 2018 18:15:56 -0300 Subject: Add leave-room endpoint --- lib/Matrix/Client.pm6 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'lib') 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) { -- cgit v1.2.3-70-g09d2