From 1e3e664d19f4808baeecc72784610daef76730bc Mon Sep 17 00:00:00 2001 From: Matias Linares Date: Sun, 3 Jun 2018 11:01:11 -0300 Subject: Change TXN-ID to use time by default. --- lib/Matrix/Client.pm6 | 3 +-- lib/Matrix/Client/Common.pm6 | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'lib/Matrix') diff --git a/lib/Matrix/Client.pm6 b/lib/Matrix/Client.pm6 index ca3884a..af9ef8b 100644 --- a/lib/Matrix/Client.pm6 +++ b/lib/Matrix/Client.pm6 @@ -21,7 +21,7 @@ submethod BUILD(:$!home-server!, :$!auth-file = 'auth') { $!access-token = $data; $!user-id = $data; $!device-id = $data; - $Matrix::Client::Common::TXN-ID = $data // 0; + $Matrix::Client::Common::TXN-ID = now.Int; $!logged = True; } } @@ -115,7 +115,6 @@ multi method change-avatar(Str:D $mxc-url!) { multi method sync() { my $res = $.get("/sync", timeout => 30000); - Matrix::Response::Sync.new($res.content) } diff --git a/lib/Matrix/Client/Common.pm6 b/lib/Matrix/Client/Common.pm6 index 670f8e3..83cf65d 100644 --- a/lib/Matrix/Client/Common.pm6 +++ b/lib/Matrix/Client/Common.pm6 @@ -1,3 +1,3 @@ unit module Matrix::Client::Common; -our $TXN-ID = 0; +our $TXN-ID; -- cgit v1.2.3-70-g09d2