Commit b9695a3ae7abc75fede349e0e5b4d0df47ef3de8

Authored by Adhidarma Hadiwinoto
1 parent 02fc109f6d
Exists in master

Fix blacklistMsgPatterns search

Showing 1 changed file with 1 additions and 1 deletions Side-by-side Diff

lib/apiserver/handler/on-received.js
... ... @@ -32,7 +32,7 @@ module.exports = (req, res) => {
32 32 const msgUpperCased = (msg || '').trim().toUpperCase();
33 33 if (
34 34 (msisdn.search(/\+*62/) === 0)
35   - && blacklistMsgPatterns.find((pattern) => msgUpperCased.search(pattern))
  35 + && blacklistMsgPatterns.find((pattern) => msgUpperCased.search(pattern) >= 0)
36 36 ) {
37 37 logger.verbose('ON-RECEIVED 5486D373: Skip invalid message', {
38 38 msg,