Improve comment to prevent flood

This commit is contained in:
Gustavo Trott 2023-11-08 10:30:51 -03:00
parent 686903a529
commit 8b4b226603

View File

@ -397,7 +397,7 @@ class LearningDashboardActor(
user <- findUserByIntId(meeting, msg.body.userId)
} yield {
if (msg.body.reactionEmoji != "none") {
//Not considering flooding reactions, ignoring if same Emoji was sent in the last 30 seconds
//Ignore multiple Reactions to prevent flooding
val hasSameReactionInLast30Seconds = user.reactions.filter(r => {
System.currentTimeMillis() - r.sentOn < (30 * 1000) && r.name == msg.body.reactionEmoji
}).length > 0