GEWIS / sudosos-backend

SudoSOS is a Node.js-based Bar and POS system made for study association GEWIS.
https://sudosos.gewis.nl
GNU Affero General Public License v3.0
4 stars 3 forks source link

Avoid duplicate emails for fines #143

Open rinkp opened 7 months ago

rinkp commented 7 months ago

Currently, users that have been fined will receive both an email

While I think it is important that users are reminded of a negative balance often, I think this might be a bit superfluous and I would suggest not sending the latter if you just sent the former (i.e. added a fine the past day

Moreover, sending two emails in a short while may cause behaviour where the spam filter of the recipient is checking whether it will receive more email from GEWIS for determining the likelihood of spam and we actually send them these emails.

Additionally, you might want to consider sending the second email even if you don't really add fines, such as during the exam week.

CodeNamedRobin commented 7 months ago

Personally, I think this might be a better idea to implement in the frontend? Both notify and handout endpoints have userIds parameters in their requests. How I could keep track of if users got an email recently (probably same day?) I don't really know, but that's a problem for later.