Free, Open Source, Self-Hosted WhatsApp API Gateway
TypeScript apibotgatewayself-hostedwhatsappwhatsapp-apiwhatsapp-automationwhatsapp-botwhatsapp-gatewaywhatsapp-gateway-apiwhatsapp-webwhatsapp-web-api
fix(lint): drop a useless escape and two dash glyphs from new lines
Yudhi Armyndharisfa6939f7cc60
diff --git a/scripts/patch-wwebjs-201832.js b/scripts/patch-wwebjs-201832.jsindex b3fc76934..e083a12e1 100644--- a/scripts/patch-wwebjs-201832.js+++ b/scripts/patch-wwebjs-201832.js@@ -234,7 +234,7 @@ function applyBackport(wwjsDir = DEFAULT_WWJS, patchFile = DEFAULT_PATCH) {if (/_normalizeId\(|\.\$1/.test(msgSrc)) {// Message.js normalizing is necessary but NOT sufficient to stand down. `patch` writes as it goes and// Message.js is the second to last file it writes, so a run that died after it lands here too (and one- // that died before it is caught below) — and skipping would+ // that died before it is caught below), and skipping would// latch that half-patched tree in permanently, because every later run takes this same branch and never// reaches the assertions below. An upstream release that fixes this lands every site at once; a crashed// run does not. Proving the tree is whole is what tells the two apart.@@ -262,7 +262,7 @@ function applyBackport(wwjsDir = DEFAULT_WWJS, patchFile = DEFAULT_PATCH) {if (landedBefore.length) {throw partialTree(new Error(- 'whatsapp-web.js is PARTIALLY patched — an earlier run was interrupted and ' ++ 'whatsapp-web.js is PARTIALLY patched: an earlier run was interrupted and ' +`${landedBefore.join(', ')} did not land. The tree cannot repair itself. Reinstall the dependency ` +'(`rm -rf node_modules/whatsapp-web.js && npm ci`) and re-run.',),diff --git a/src/modules/session/message-mutation-guard.ts b/src/modules/session/message-mutation-guard.tsindex ceed3db51..19f345f86 100644--- a/src/modules/session/message-mutation-guard.ts+++ b/src/modules/session/message-mutation-guard.ts@@ -40,7 +40,7 @@ function entityOf(jid: string): { kind: string; id: string } | null {const parsed = parseWaId(jid);if (parsed.kind === 'user') return { kind: 'user', id: phoneKey(parsed.userPart) };if (parsed.kind !== 'unknown') return { kind: parsed.kind, id: parsed.userPart };- return !jid.includes('@') && /^\+?\d[\d \-]*$/.test(jid.trim()) ? { kind: 'user', id: phoneKey(jid) } : null;+ return !jid.includes('@') && /^\+?\d[\d -]*$/.test(jid.trim()) ? { kind: 'user', id: phoneKey(jid) } : null;}const isPerson = (kind: string): boolean => kind === 'user' || kind === 'lid';