diff options
author | Matias Linares <matiaslina@openmailbox.org> | 2018-06-04 23:17:35 -0300 |
---|---|---|
committer | Matias Linares <matiaslina@openmailbox.org> | 2018-06-04 23:17:35 -0300 |
commit | efcf3efae456cb9a795d64d30338da3d837b4bc0 (patch) | |
tree | ea10201a4a94989966dfba91cc2c6254f7568696 /lib/Matrix/Client | |
parent | bda35c5b13e2c7ff495d23bfc804a5adc5d08528 (diff) | |
download | perl6-matrix-client-efcf3efae456cb9a795d64d30338da3d837b4bc0.tar.gz |
return event-id when sending from Matrix::Client::Room
Diffstat (limited to 'lib/Matrix/Client')
-rw-r--r-- | lib/Matrix/Client/Room.pm6 | 7 |
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() { |