File tree Expand file tree Collapse file tree
apitest-commons/src/main/java/io/mosip/testrig/apirig/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,7 +19,11 @@ public final class NotificationListener {
1919 private static final int MAX_QUEUE_SIZE = 50 ;
2020 private static final long INACTIVE_EXPIRY_MS = Long .parseLong (ConfigManager .getproperty ("otp_queue_inactive_expiry_time" )) * 60 * 1000 ; // 15 mins
2121 private static final Pattern OTP_PATTERN = Pattern .compile (
22- "(?i)(?:\\ bis\\ s+(\\ d{6})\\ s+and\\ s+is\\ s+valid|\\ buse\\ s+(?:otp\\ s+)?(\\ d{6})\\ b)" );
22+ "(?i)(?:" +
23+ "\\ bis\\ s+(\\ d{6})\\ s+and\\ s+is\\ s+valid" + // English: "is XXXXXX and is valid"
24+ "|\\ buse\\ s+(?:otp\\ s+)?(\\ d{6})\\ b" + // English: "Use [OTP] XXXXXX"
25+ "|\\ bOTP\\ b.*?(\\ d{6})(?!\\ d)" + // Multilingual: OTP keyword + nearest 6 digits
26+ ")" );
2327 private static final ConcurrentHashMap <String , EmailQueue > otpQueues = new ConcurrentHashMap <>();
2428
2529 private static final ConcurrentHashMap <String , EmailQueue > notificationQueues = new ConcurrentHashMap <>();
You can’t perform that action at this time.
0 commit comments