From 007f12ce41d0331f3d2e2d70f358fb2793d7599a Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Sat, 4 Aug 2018 18:54:22 -0300 Subject: use TWEAK instead of BUILD --- lib/Matrix/Client/Room.pm6 | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'lib') diff --git a/lib/Matrix/Client/Room.pm6 b/lib/Matrix/Client/Room.pm6 index 6897b8d..efbca06 100644 --- a/lib/Matrix/Client/Room.pm6 +++ b/lib/Matrix/Client/Room.pm6 @@ -7,17 +7,8 @@ unit class Matrix::Client::Room does Matrix::Client::Requester; has $!name; has $.id; -multi submethod BUILD(Str :$!id!, :$!home-server!, :$!access-token!, :$json?) { +submethod TWEAK { $!url-prefix = "/rooms/$!id"; - - if so $json { - my @events = $json.clone; - for @events -> $ev { - if $ev eq "m.room.name" { - $!name = $ev; - } - } - } } method !get-name() { -- cgit v1.2.3-70-g09d2