From 40c0f046ff26ea19a1a5da4ade65d3d0fa93795a Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Sat, 4 Aug 2018 18:55:07 -0300 Subject: Remove useless error checking from get-name --- lib/Matrix/Client/Room.pm6 | 8 ++------ 1 file 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) - } else { - warn "Error {$res.status-line}, content {$res.content}"; - } + my $data = $.state('m.room.name'); + $!name = $data; } method name() { -- cgit v1.2.3-70-g09d2