@manybot/manybot 5.3.0 → 5.3.1

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.
@@ -120,7 +120,7 @@ export function createStore() {
120
120
  // one extra source we have (feeds the on-disk cache too).
121
121
  const pushName = msg.pushName;
122
122
  const senderId = key.participant ?? msg.key.remoteJid;
123
- if (pushName && senderId && !senderId.endsWith("@g.us")) {
123
+ if (pushName && senderId && !msg.key.fromMe && !senderId.endsWith("@g.us")) {
124
124
  const existing = contacts[senderId];
125
125
  if (existing?.notify !== pushName) {
126
126
  contacts[senderId] = { ...existing, id: senderId, notify: pushName };
@@ -630,7 +630,7 @@ export function buildMessageContext(msg, sock, store, guardOptions = {}) {
630
630
  async getContact() {
631
631
  const info = store.contacts[sender]
632
632
  ?? store.contacts[store.resolveJid(msg.key.participant ?? "")];
633
- const botJid = sock.user?.id ? normalizeJid(sock.user.id) : null;
633
+ const botJid = sock.user?.id ? jidNormalizedUser(sock.user.id) : null;
634
634
  return normalizeContact(sender, info, botJid, sock);
635
635
  },
636
636
  };
@@ -1268,7 +1268,7 @@ function buildPollApi(sock, store, rawJid, guardOptions, pluginName) {
1268
1268
  }
1269
1269
  // ── Base API (shared between setup and runtime) ───────────────────────────────
1270
1270
  function buildBaseApi(sock, store, pluginRegistry, pluginName) {
1271
- const botJid = sock.user?.id ? normalizeJid(sock.user.id) : null;
1271
+ const botJid = sock.user?.id ? jidNormalizedUser(sock.user.id) : null;
1272
1272
  if (!botJid)
1273
1273
  logger.warn("[pluginApi] botId is null — socket may not be ready yet.");
1274
1274
  return {
package/dist/main.js CHANGED
File without changes
package/package.json CHANGED
@@ -5,7 +5,7 @@
5
5
  "name": "SyntaxError!",
6
6
  "email": "me@stxerr.dev"
7
7
  },
8
- "version": "5.3.0",
8
+ "version": "5.3.1",
9
9
  "license": "GPL-3.0-only",
10
10
  "private": false,
11
11
  "engines": {