diff options
author | Matias Linares <matiaslina@openmailbox.org> | 2018-06-09 12:45:19 -0300 |
---|---|---|
committer | Matias Linares <matiaslina@openmailbox.org> | 2018-06-09 12:45:19 -0300 |
commit | 35c69734c14e58bc1395816c3c6eef208ee12ebc (patch) | |
tree | dda3579a689a767f7218f366f4f5b41bff5c529b /lib | |
parent | c0e320ce433bcd6551211904300563932e8339cb (diff) | |
download | perl6-matrix-client-35c69734c14e58bc1395816c3c6eef208ee12ebc.tar.gz |
Reorder sync methods
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Matrix/Client.pm6 | 10 |
1 files 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 |