diff options
author | Matias Linares <matiaslina@gmail.com> | 2018-08-04 18:55:07 -0300 |
---|---|---|
committer | Matias Linares <matiaslina@gmail.com> | 2018-08-04 18:55:07 -0300 |
commit | 40c0f046ff26ea19a1a5da4ade65d3d0fa93795a (patch) | |
tree | 3e6224510e2959214112a4f85f4c9cf039c879e1 /lib | |
parent | 007f12ce41d0331f3d2e2d70f358fb2793d7599a (diff) | |
download | perl6-matrix-client-40c0f046ff26ea19a1a5da4ade65d3d0fa93795a.tar.gz |
Remove useless error checking from get-name
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Matrix/Client/Room.pm6 | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/Matrix/Client/Room.pm6 b/lib/Matrix/Client/Room.pm6 index efbca06..3e104bf 100644 --- a/lib/Matrix/Client/Room.pm6 +++ b/lib/Matrix/Client/Room.pm6 @@ -12,12 +12,8 @@ submethod TWEAK { } method !get-name() { - my $res = $.get('/state/m.room.name'); - if $res.is-success { - $!name = from-json($res.content)<name> - } else { - warn "Error {$res.status-line}, content {$res.content}"; - } + my $data = $.state('m.room.name'); + $!name = $data<name>; } method name() { |