From 03949ff67b0219a6039c20983c00eae9ab68e849 Mon Sep 17 00:00:00 2001 From: Morgan McMillian Date: Sat, 11 Jun 2022 21:47:27 -0700 Subject: [PATCH] use local timestamp when creating events --- pnut-matrix.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pnut-matrix.py b/pnut-matrix.py index 19eb9ce..0792431 100644 --- a/pnut-matrix.py +++ b/pnut-matrix.py @@ -93,7 +93,7 @@ def new_message(msg, meta): if 'content' in msg: text = msg.content.text + "\n" - ts = int(msg.created_at.strftime('%s')) * 1000 + ts = int(time.time()) * 1000 lnktext = "" for link in msg.content.entities.links: @@ -125,7 +125,7 @@ def new_media(room_id, msg): matrix_api = MatrixHttpApi(config['MATRIX_HOST'], token=config['MATRIX_AS_TOKEN'], identity=matrix_id) - ts = int(msg.created_at.strftime('%s')) * 1000 + ts = int(time.time()) * 1000 if 'io.pnut.core.oembed' in msg.raw: