aboutsummaryrefslogtreecommitdiff
path: root/lib/Matrix/Client/Room.rakumod
diff options
context:
space:
mode:
authorMatias Linares <matiaslina@gmail.com>2021-03-28 19:14:56 -0300
committerMatias Linares <matiaslina@gmail.com>2021-03-28 19:17:30 -0300
commitf3f846be62f3715ad2a716043c8e92806c2472fa (patch)
tree20761f1c0db6cf6b05c9944ec239f3f8711e831d /lib/Matrix/Client/Room.rakumod
parentf6397392c4fc88d1e9335bbbc4f91d8cb2f29368 (diff)
downloadperl6-matrix-client-f3f846be62f3715ad2a716043c8e92806c2472fa.tar.gz
Add read-markers api support
Diffstat (limited to 'lib/Matrix/Client/Room.rakumod')
-rw-r--r--lib/Matrix/Client/Room.rakumod15
1 files changed, 14 insertions, 1 deletions
diff --git a/lib/Matrix/Client/Room.rakumod b/lib/Matrix/Client/Room.rakumod
index 1e8c582..34c73ae 100644
--- a/lib/Matrix/Client/Room.rakumod
+++ b/lib/Matrix/Client/Room.rakumod
@@ -6,7 +6,7 @@ use Matrix::Client::Response;
unit class Matrix::Client::Room does Matrix::Client::Requester;
has $!name;
-has $.id;
+has $.id is required;
submethod TWEAK {
$!url-prefix = "/rooms/$!id";
@@ -142,6 +142,19 @@ method send-state(Str:D $event-type, :$state-key = "", *%args --> Str) {
from-json($res.content)<event_id>
}
+#| POST - /_matrix/client/r0/rooms/{roomId}/read_markers
+method read-marker(Str:D $fully-read, Str $read?) {
+ my %data = %(
+ "m.fully_read" => $fully-read
+ );
+
+ %data<m.read> = $read with $read;
+
+ $.post('/read_markers', |%data);
+}
+
+method typing()
+
# Room membership!
## Joining rooms