use local timestamp when creating events

This commit is contained in:
Morgan McMillian 2022-06-11 21:47:27 -07:00
parent 9571238043
commit 03949ff67b

View file

@ -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: