Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/python-nbxmpp.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlovetox <philipp@hoerist.com>2021-11-04 23:00:57 +0300
committerlovetox <philipp@hoerist.com>2021-11-04 23:00:57 +0300
commitb866d4a9cc16992fb00094a0a14c776082042701 (patch)
treeb46c74744071c7733a212a2d041e43e172b700c0
parent0ac2a6a67ceead4ff32afe96bba5d443b139b816 (diff)
Structs: Set default timestamps correctly
-rw-r--r--nbxmpp/structs.py4
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