Fix incorrect timing bug

Fix a bug where the client didn't actually ignore messages that were sent in the past. This could cause a server to stop running because it had been asked to stop in the past, forcing the Matrix room to spam enough messages until the command would no longer appear in the initial sync
main
Bram van den Heuvel 2023-10-02 17:22:40 +02:00
parent eb5ba196cb
commit 89a118dff7
2 changed files with 1 additions and 2 deletions

View File

@ -1,4 +1,3 @@
import src.mc_wrapper as mc_wrapper
import src.mxclient as matrix_client
import asyncio

View File

@ -16,7 +16,7 @@ async def message_callback(room: MatrixRoom, event: RoomMessageText) -> None:
return
if event.sender == client.user_id:
return
if int(event.server_timestamp) < STARTUP_TIME:
if int(event.server_timestamp) / 1000 < STARTUP_TIME:
return
# Determine how to display username