From 35c69734c14e58bc1395816c3c6eef208ee12ebc Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Sat, 9 Jun 2018 12:45:19 -0300 Subject: Reorder sync methods --- lib/Matrix/Client.pm6 | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Matrix/Client.pm6 b/lib/Matrix/Client.pm6 index f2a5ec1..82330af 100644 --- a/lib/Matrix/Client.pm6 +++ b/lib/Matrix/Client.pm6 @@ -108,9 +108,8 @@ method whoami { # Syncronization -multi method sync(:$since = "") { - my $res = $.get("/sync", timeout => 30000, since => $since); - Matrix::Response::Sync.new($res.content) +multi method sync(Hash :$sync-filter is copy, :$since = "") { + $.sync(sync-filter => to-json($sync-filter), since => $since) } multi method sync(Str :$sync-filter, Str :$since = "") { @@ -123,8 +122,9 @@ multi method sync(Str :$sync-filter, Str :$since = "") { Matrix::Response::Sync.new($res.content) } -multi method sync(Hash :$sync-filter is copy, :$since = "") { - $.sync(sync-filter => to-json($sync-filter), since => $since) +multi method sync(:$since = "") { + my $res = $.get("/sync", timeout => 30000, since => $since); + Matrix::Response::Sync.new($res.content) } # Rooms -- cgit v1.2.3-70-g09d2