security fix not taking messages from wrong channels anymore
This commit is contained in:
parent
7b1f95bcd5
commit
10dee533d1
@ -58,12 +58,15 @@ public class DoStuff {
|
|||||||
}
|
}
|
||||||
List<User> blockLast = event.getMessage().getUserMentions().buffer().blockLast();
|
List<User> blockLast = event.getMessage().getUserMentions().buffer().blockLast();
|
||||||
String content = event.getMessage().getContent();
|
String content = event.getMessage().getContent();
|
||||||
if (!channelpermissionsDenied && blockLast != null) {
|
if (!channelpermissionsDenied) {
|
||||||
|
if (blockLast != null)
|
||||||
|
{
|
||||||
for (User user : blockLast) {
|
for (User user : blockLast) {
|
||||||
content = content.replace(user.getId().asString(), "");
|
content = content.replace(user.getId().asString(), "");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
MessageResponseHandler.getMessage(content);
|
||||||
}
|
}
|
||||||
MessageResponseHandler.getMessage(content);
|
|
||||||
boolean mentionedBot = false;
|
boolean mentionedBot = false;
|
||||||
if (blockLast != null){
|
if (blockLast != null){
|
||||||
for (User user : blockLast)
|
for (User user : blockLast)
|
||||||
|
Binary file not shown.
Binary file not shown.
@ -1,5 +1,5 @@
|
|||||||
#Generated by Maven
|
#Generated by Maven
|
||||||
#Mon Nov 02 09:03:03 CET 2020
|
#Mon Nov 02 11:08:19 CET 2020
|
||||||
version=1.0
|
version=1.0
|
||||||
groupId=com.mycompany
|
groupId=com.mycompany
|
||||||
artifactId=ArtificialAutism
|
artifactId=ArtificialAutism
|
||||||
|
Loading…
Reference in New Issue
Block a user