aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMatias Linares <matiaslina@openmailbox.org>2018-06-03 11:01:11 -0300
committerMatias Linares <matiaslina@openmailbox.org>2018-06-03 11:01:11 -0300
commit1e3e664d19f4808baeecc72784610daef76730bc (patch)
treec8a98998d721edce8ccb2a2879cd8bfcf492e221 /lib
parente31551dfe5d2af70add8ee5f5605f845e0dd6049 (diff)
downloadperl6-matrix-client-1e3e664d19f4808baeecc72784610daef76730bc.tar.gz
Change TXN-ID to use time by default.
Diffstat (limited to 'lib')
-rw-r--r--lib/Matrix/Client.pm63
-rw-r--r--lib/Matrix/Client/Common.pm62
2 files changed, 2 insertions, 3 deletions
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<access_token>;
$!user-id = $data<user_id>;
$!device-id = $data<device_id>;
- $Matrix::Client::Common::TXN-ID = $data<txn_id> // 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;