aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Matrix/Client/Room.pm67
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Matrix/Client/Room.pm6 b/lib/Matrix/Client/Room.pm6
index 1f6aa19..6ba3ff1 100644
--- a/lib/Matrix/Client/Room.pm6
+++ b/lib/Matrix/Client/Room.pm6
@@ -43,7 +43,12 @@ method messages() {
method send(Str $body!, Str :$type? = "m.text") {
$Matrix::Client::Common::TXN-ID++;
- $.put("/send/m.room.message/{$Matrix::Client::Common::TXN-ID}", msgtype => $type, body => $body)
+ my $res = $.put(
+ "/send/m.room.message/{$Matrix::Client::Common::TXN-ID}",
+ msgtype => $type, body => $body
+ );
+
+ from-json($res.content)<event_id>
}
method leave() {