@@ -18,6 +18,7 @@ public final class ScamBlockerConfig {
1818 private final Mode mode ;
1919 private final String reportChannelPattern ;
2020 private final String botTrapChannelPattern ;
21+ private final String trustedUserRolePattern ;
2122 private final Set <String > suspiciousKeywords ;
2223 private final Set <String > hostWhitelist ;
2324 private final Set <String > hostBlacklist ;
@@ -32,6 +33,8 @@ private ScamBlockerConfig(@JsonProperty(value = "mode", required = true) Mode mo
3233 required = true ) String reportChannelPattern ,
3334 @ JsonProperty (value = "botTrapChannelPattern" ,
3435 required = true ) String botTrapChannelPattern ,
36+ @ JsonProperty (value = "trustedUserRolePattern" ,
37+ required = true ) String trustedUserRolePattern ,
3538 @ JsonProperty (value = "suspiciousKeywords" ,
3639 required = true ) Set <String > suspiciousKeywords ,
3740 @ JsonProperty (value = "hostWhitelist" , required = true ) Set <String > hostWhitelist ,
@@ -47,6 +50,7 @@ private ScamBlockerConfig(@JsonProperty(value = "mode", required = true) Mode mo
4750 this .mode = Objects .requireNonNull (mode );
4851 this .reportChannelPattern = Objects .requireNonNull (reportChannelPattern );
4952 this .botTrapChannelPattern = Objects .requireNonNull (botTrapChannelPattern );
53+ this .trustedUserRolePattern = Objects .requireNonNull (trustedUserRolePattern );
5054 this .suspiciousKeywords = new HashSet <>(Objects .requireNonNull (suspiciousKeywords ));
5155 this .hostWhitelist = new HashSet <>(Objects .requireNonNull (hostWhitelist ));
5256 this .hostBlacklist = new HashSet <>(Objects .requireNonNull (hostBlacklist ));
@@ -86,6 +90,15 @@ public String getBotTrapChannelPattern() {
8690 return botTrapChannelPattern ;
8791 }
8892
93+ /**
94+ * Gets the REGEX pattern used to identify roles that will be ignored for scam detection.
95+ *
96+ * @return the REGEX pattern
97+ */
98+ public String getTrustedUserRolePattern () {
99+ return trustedUserRolePattern ;
100+ }
101+
89102 /**
90103 * Gets the set of keywords that are considered suspicious if they appear in a message.
91104 *
0 commit comments