summaryrefslogtreecommitdiff
path: root/lib/Matrix
diff options
context:
space:
mode:
authorMatias Linares <matiaslina@openmailbox.org>2018-06-04 23:17:35 -0300
committerMatias Linares <matiaslina@openmailbox.org>2018-06-04 23:17:35 -0300
commitefcf3efae456cb9a795d64d30338da3d837b4bc0 (patch)
treeea10201a4a94989966dfba91cc2c6254f7568696 /lib/Matrix
parentbda35c5b13e2c7ff495d23bfc804a5adc5d08528 (diff)
downloadperl6-matrix-client-efcf3efae456cb9a795d64d30338da3d837b4bc0.tar.gz
return event-id when sending from Matrix::Client::Room
Diffstat (limited to 'lib/Matrix')
-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() {