ironmonk88 / monks-chat-timer

GNU General Public License v3.0
5 stars 1 forks source link

[BUG] Chat timer issues #1

Closed szefo09 closed 1 year ago

szefo09 commented 1 year ago

While trying out chat timer, I've run into several issues -

  1. message.update and ChatMessage.create run for every logged user, not just the owner of the message, causing User lacks permission to update errors and multiple new messages in the chat. https://github.com/ironmonk88/monks-little-details/blob/91f9a1cb8a138205d4dc9bf3cd0239dd19703218/js/chat-timer.js#L115-L125

  2. The script's timer is using Date.now() for every client. One of my players was running a system that had nearly 10 sec. delay between what was my Date.now() vs theirs, making the timer inaccurate. If there is a possibility to calculate the delta while also avoiding local desync, it would be great. I know that all of this is calculated client-wise, so I'm not sure if there is an option to actually fix it.

ironmonk88 commented 1 year ago

Closing this as it's related to MLD code and the updated code has fixed this.