From 49d5891bf5d2a22ae9c4533c88e673ea96b650d1 Mon Sep 17 00:00:00 2001 From: Blue Date: Wed, 1 Jan 2020 23:24:06 +0100 Subject: [PATCH] Use datetime instead of raw timestamp --- fbchat/_client.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/fbchat/_client.py b/fbchat/_client.py index e451d22..845e941 100644 --- a/fbchat/_client.py +++ b/fbchat/_client.py @@ -1726,7 +1726,9 @@ class Client: thread_ids = _util.require_list(thread_ids) data = { - "watermarkTimestamp": timestamp or _util.now(), + "watermarkTimestamp": _util.datetime_to_millis(timestamp) + if timestamp + else _util.now(), "shouldSendReadReceipt": "true", } @@ -1742,7 +1744,7 @@ class Client: Args: thread_ids: User/Group IDs to set as read. See :ref:`intro_threads` - timestamp: Timestamp to signal the read cursor at, in milliseconds, default is now() + timestamp: Timestamp (as a Datetime) to signal the read cursor at, default is the current time Raises: FBchatException: If request failed @@ -1756,7 +1758,7 @@ class Client: Args: thread_ids: User/Group IDs to set as unread. See :ref:`intro_threads` - timestamp: Timestamp to signal the read cursor at, in milliseconds, default is now() + timestamp: Timestamp (as a Datetime) to signal the read cursor at, default is the current time Raises: FBchatException: If request failed