From a090293f1fb64375f5ba16b6a5e53c829eb41add Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Tue, 18 Jun 2019 00:02:08 -0300 Subject: Add invite endpoint --- lib/Matrix/Client.pm6 | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/Matrix') diff --git a/lib/Matrix/Client.pm6 b/lib/Matrix/Client.pm6 index a19918b..86de2e8 100644 --- a/lib/Matrix/Client.pm6 +++ b/lib/Matrix/Client.pm6 @@ -219,6 +219,14 @@ method unban(Str $room-id, Str $user-id) { ); } +#| POST - /_matrix/client/r0/rooms/{roomId}/invite +method invite(Str $room-id, Str $user-id) { + $.post( + "/rooms/$room-id/invite", + :$user-id + ) +} + #| POST - /_matrix/client/r0/rooms/{roomId}/leave method leave-room($room-id) { $.post("/rooms/$room-id/leave"); -- cgit v1.2.3-70-g09d2