zaanposni / discord-masz

MASZ is a selfhostable highly sophisticated moderation bot for Discord. Includes a web dashboard and a discord bot.
https://discord.gg/5zjpzw6h3S
Other
71 stars 18 forks source link

Fix: wrong regex and time to punished-time issues #581

Closed alefDev-prog closed 10 months ago

alefDev-prog commented 1 year ago

Fixes #579

Affected files:

Regex-issue Original regex: /([01][012]|[1-9]):[0-5][0-9](\\s)?/ New regex: /^([01]\d|2[0-3]):[0-5]\d$/

Time issue I have made changes to the calculatePunishedUntil function. What I have done:

  1. Made the time parameter optional
  2. If the time is false, the time is being set to 12 hours by default
  3. If date is false, the modCase.punishedUntil is being set to 12 hours in the future

Errors I have observed, but not fixed:

  1. I presume that the variable utfOffset in NewCase.svelte should be utcOffset
zaanposni commented 1 year ago

Hi @alefDev-prog

thanks for your contribution.

Do you want to work on the time set to null issue as well or do you want me to merge it and do it myself :) Furthermore, are you fine with being mentioned in our release notes as contributor?

alefDev-prog commented 1 year ago

Hi, I thought I could have a look on the time issue today as well. Yes I am fine with being mentioned among the contributors.

alefDev-prog commented 1 year ago

I have commited my new changes to address the issue with the time. Please do review, to make sure that I haven't misunderstood something.

zaanposni commented 10 months ago

Gonna have to cancel this PR since I am not able to actively work on this repo right now and want to get a final release done.

Thanks for your work, I will mention you as a contributor.