Commit 601d43f
committed
fix(CoolMessages): prevent duplicate message add
Fixes a bug where any user could star react to a message and the bot
would unconditionally add that message to the cool messages board,
considering the fact that it would surpass the minimum reaction
count requirement.
This commit gets the bot to react with the same cool messages emoji the
first time and use that reaction as proof that it has quoted the message
and that it should not deal with it in case somebody reacts to it again.1 parent 34fe09f commit 601d43f
File tree
1 file changed
+20
-4
lines changed- application/src/main/java/org/togetherjava/tjbot/features/basic
1 file changed
+20
-4
lines changedLines changed: 20 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
57 | 63 | | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
62 | 69 | | |
63 | 70 | | |
64 | 71 | | |
| |||
110 | 117 | | |
111 | 118 | | |
112 | 119 | | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
113 | 129 | | |
0 commit comments