summaryrefslogtreecommitdiff
path: root/lib/Matrix
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Matrix')
-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() {