Add option to disable chat filters in private channels
A constructor parameter and corresponding field 'disableInPrivate' have been added to the ChatFilter class. This handles disabling specific chat filters in private channels. The necessary checks have been implemented in RegexManager. The configuration for each filter is also updated in RegexConfig to incorporate this new functionality.
This commit is contained in:
@@ -60,7 +60,10 @@ public class RegexManager {
|
||||
return false;
|
||||
}
|
||||
CachedPermissionData permissionData = user.getCachedData().getPermissionData();
|
||||
boolean isPrivate = channel.equals("party");
|
||||
for(ChatFilter chatFilter : chatFilters) {
|
||||
if (isPrivate && chatFilter.isDisabledInPrivate())
|
||||
continue;
|
||||
switch (chatFilter.getType()) {
|
||||
case CHAT:
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user