diff --git a/whatsapp-js/src/parseUsualQueue.js b/whatsapp-js/src/parseUsualQueue.js index e08c8512..a14c548e 100644 --- a/whatsapp-js/src/parseUsualQueue.js +++ b/whatsapp-js/src/parseUsualQueue.js @@ -37,11 +37,15 @@ export function parseMessage(message) { } const removeIndex = (line) => { + line = line.replace(/[\u200B-\u200D\uFEFF]/g, ''); var nameStartIdx = line.search("[.]"); if (nameStartIdx == -1 || nameStartIdx >= line.length) { console.log("Not processing: " + line); return ""; } + if (line.trim() === '') { + return ""; + } return line.substring(nameStartIdx + 1).trim(); };