From a6a3768a38c84acdd551c6c824f0e529f0833ca5 Mon Sep 17 00:00:00 2001 From: Mads Marquart Date: Sun, 8 Sep 2019 13:15:11 +0200 Subject: [PATCH] Fix _util.now() usage in Client --- fbchat/_client.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fbchat/_client.py b/fbchat/_client.py index 0ce3621..78c8820 100644 --- a/fbchat/_client.py +++ b/fbchat/_client.py @@ -849,7 +849,7 @@ class Client: form = { "folders[0]": "inbox", "client": "mercury", - "last_action_timestamp": now() - 60 * 1000 + "last_action_timestamp": _util.now() - 60 * 1000 # 'last_action_timestamp': 0 } j = self._payload_post("/ajax/mercury/unread_threads.php", form) @@ -1907,7 +1907,7 @@ class Client: def _readStatus(self, read, thread_ids): thread_ids = _util.require_list(thread_ids) - data = {"watermarkTimestamp": now(), "shouldSendReadReceipt": "true"} + data = {"watermarkTimestamp": _util.now(), "shouldSendReadReceipt": "true"} for thread_id in thread_ids: data["ids[{}]".format(thread_id)] = "true" if read else "false" @@ -1945,7 +1945,9 @@ class Client: Todo: Documenting this """ - j = self._payload_post("/ajax/mercury/mark_seen.php", {"seen_timestamp": now()}) + j = self._payload_post( + "/ajax/mercury/mark_seen.php", {"seen_timestamp": _util.now()} + ) def friendConnect(self, friend_id): """