aboutsummaryrefslogtreecommitdiff
path: root/lib/Matrix/Client
diff options
context:
space:
mode:
authorMatias Linares <matiaslina@gmail.com>2018-08-04 18:55:07 -0300
committerMatias Linares <matiaslina@gmail.com>2018-08-04 18:55:07 -0300
commit40c0f046ff26ea19a1a5da4ade65d3d0fa93795a (patch)
tree3e6224510e2959214112a4f85f4c9cf039c879e1 /lib/Matrix/Client
parent007f12ce41d0331f3d2e2d70f358fb2793d7599a (diff)
downloadperl6-matrix-client-40c0f046ff26ea19a1a5da4ade65d3d0fa93795a.tar.gz
Remove useless error checking from get-name
Diffstat (limited to 'lib/Matrix/Client')
-rw-r--r--lib/Matrix/Client/Room.pm68
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() {