diff options
author | lovetox <philipp@hoerist.com> | 2021-11-04 23:00:57 +0300 |
---|---|---|
committer | lovetox <philipp@hoerist.com> | 2021-11-04 23:00:57 +0300 |
commit | b866d4a9cc16992fb00094a0a14c776082042701 (patch) | |
tree | b46c74744071c7733a212a2d041e43e172b700c0 | |
parent | 0ac2a6a67ceead4ff32afe96bba5d443b139b816 (diff) |
Structs: Set default timestamps correctly
-rw-r--r-- | nbxmpp/structs.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/nbxmpp/structs.py b/nbxmpp/structs.py index 5f38506..80e5831 100644 --- a/nbxmpp/structs.py +++ b/nbxmpp/structs.py @@ -931,7 +931,7 @@ class MessageProperties: body: Optional[str] = None thread: Optional[str] = None user_timestamp = None - timestamp: float = time.time() + timestamp: float = field(default_factory=time.time) has_server_delay: bool = False error = None eme: Optional[EMEData] = None @@ -1153,7 +1153,7 @@ class PresenceProperties: self_bare: bool = False from_muc: bool = False status: str = '' - timestamp: float = time.time() + timestamp: float = field(default_factory=time.time) user_timestamp: Optional[float] = None idle_timestamp: Optional[float] = None signed: Optional[Any] = None |