av6-core 1.7.11 → 1.7.13

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.
package/dist/index.js CHANGED
@@ -3311,7 +3311,9 @@ async function resolveAllRecipients(args) {
3311
3311
  for (const k of toArray(cfg.recipients)) {
3312
3312
  const v = getNestedValueV2(args.evtData, k);
3313
3313
  if (typeof v === "string") res[type].push(v);
3314
- if (Array.isArray(v)) res[type].push(...v.filter((x) => typeof x === "string"));
3314
+ if (typeof v === "number") res[type].push(String(v));
3315
+ if (Array.isArray(v))
3316
+ res[type].push(...v.filter((x) => typeof x === "string" || typeof x === "number").map(String));
3315
3317
  }
3316
3318
  continue;
3317
3319
  }
@@ -3752,7 +3754,9 @@ var NotificationService = class {
3752
3754
  if (!userIds.length) return /* @__PURE__ */ new Map();
3753
3755
  const rows = await this.prisma.session.findMany({
3754
3756
  where: {
3755
- userId: { in: userIds },
3757
+ user: {
3758
+ userId: { in: userIds }
3759
+ },
3756
3760
  deviceNotificationToken: { not: null },
3757
3761
  logoutAt: null
3758
3762
  },
package/dist/index.mjs CHANGED
@@ -3255,7 +3255,9 @@ async function resolveAllRecipients(args) {
3255
3255
  for (const k of toArray(cfg.recipients)) {
3256
3256
  const v = getNestedValueV2(args.evtData, k);
3257
3257
  if (typeof v === "string") res[type].push(v);
3258
- if (Array.isArray(v)) res[type].push(...v.filter((x) => typeof x === "string"));
3258
+ if (typeof v === "number") res[type].push(String(v));
3259
+ if (Array.isArray(v))
3260
+ res[type].push(...v.filter((x) => typeof x === "string" || typeof x === "number").map(String));
3259
3261
  }
3260
3262
  continue;
3261
3263
  }
@@ -3696,7 +3698,9 @@ var NotificationService = class {
3696
3698
  if (!userIds.length) return /* @__PURE__ */ new Map();
3697
3699
  const rows = await this.prisma.session.findMany({
3698
3700
  where: {
3699
- userId: { in: userIds },
3701
+ user: {
3702
+ userId: { in: userIds }
3703
+ },
3700
3704
  deviceNotificationToken: { not: null },
3701
3705
  logoutAt: null
3702
3706
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "av6-core",
3
- "version": "1.7.11",
3
+ "version": "1.7.13",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",