security fix not taking messages from wrong channels anymore

This commit is contained in:
jenzuffer 2020-11-02 11:13:31 +01:00
parent fd2610f974
commit 975d5300ad
4 changed files with 6 additions and 3 deletions

View File

@ -58,12 +58,15 @@ public class DoStuff {
}
List<User> blockLast = event.getMessage().getUserMentions().buffer().blockLast();
String content = event.getMessage().getContent();
if (!channelpermissionsDenied && blockLast != null) {
if (!channelpermissionsDenied) {
if (blockLast != null)
{
for (User user : blockLast) {
content = content.replace(user.getId().asString(), "");
}
}
MessageResponseHandler.getMessage(content);
}
MessageResponseHandler.getMessage(content);
boolean mentionedBot = false;
if (blockLast != null){
for (User user : blockLast)

View File

@ -1,5 +1,5 @@
#Generated by Maven
#Mon Nov 02 09:03:03 CET 2020
#Mon Nov 02 11:08:19 CET 2020
version=1.0
groupId=com.mycompany
artifactId=ArtificialAutism