aboutsummaryrefslogtreecommitdiff
path: root/lib/Matrix
diff options
context:
space:
mode:
authorMatias Linares <matiaslina@gmail.com>2021-03-28 19:51:16 -0300
committerMatias Linares <matiaslina@gmail.com>2021-03-28 19:51:16 -0300
commite57b75a19a8f4a02bf93e99ac9dbf3c06575b219 (patch)
treee7322f6a0e731e77aaa6b7958454fb43b3455c13 /lib/Matrix
parentf3f846be62f3715ad2a716043c8e92806c2472fa (diff)
downloadperl6-matrix-client-e57b75a19a8f4a02bf93e99ac9dbf3c06575b219.tar.gz
Add typing api support
Diffstat (limited to 'lib/Matrix')
-rw-r--r--lib/Matrix/Client/Room.rakumod10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/Matrix/Client/Room.rakumod b/lib/Matrix/Client/Room.rakumod
index 34c73ae..1a6908f 100644
--- a/lib/Matrix/Client/Room.rakumod
+++ b/lib/Matrix/Client/Room.rakumod
@@ -153,7 +153,15 @@ method read-marker(Str:D $fully-read, Str $read?) {
$.post('/read_markers', |%data);
}
-method typing()
+#| PUT - /_matrix/client/r0/rooms/{roomId}/typing/{userId}
+method typing(Bool $typing, Str :$user-id!, Int :$timeout) {
+ my %data = :$typing;
+
+ %data<timeout> = $timeout with $timeout;
+ $.put(
+ "/typing/{$user-id}", |%data
+ );
+}
# Room membership!