whatsapp-store-db 1.3.49 → 1.3.50

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -8,7 +8,8 @@ function contactHandler(sessionId, event, getJid = undefined) {
8
8
  const logger = (0, shared_1.useLogger)();
9
9
  let listening = false;
10
10
  /**
11
- * Validates that both sessionId and contact id are non-empty
11
+ * Validates that both sessionId and contact id are non-empty and properly formatted.
12
+ * Rejects @lid IDs that couldn't be resolved - these will be created by message handler later.
12
13
  */
13
14
  const isValidContact = (id) => {
14
15
  if (!sessionId || sessionId.trim() === '') {
@@ -17,6 +18,11 @@ function contactHandler(sessionId, event, getJid = undefined) {
17
18
  if (!id || id.trim() === '') {
18
19
  return false;
19
20
  }
21
+ // Reject @lid IDs - if we couldn't resolve them, skip storing
22
+ // The message handler will create the contact with correct phone number when message arrives
23
+ if (id.endsWith('@lid')) {
24
+ return false;
25
+ }
20
26
  return true;
21
27
  };
22
28
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "whatsapp-store-db",
3
- "version": "1.3.49",
3
+ "version": "1.3.50",
4
4
  "description": "Minimal Baileys data storage for your favorite DBMS built with Prisma",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",