av6-core 1.7.13 → 1.7.14

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
@@ -3760,14 +3760,21 @@ var NotificationService = class {
3760
3760
  deviceNotificationToken: { not: null },
3761
3761
  logoutAt: null
3762
3762
  },
3763
- select: { userId: true, deviceNotificationToken: true }
3763
+ select: {
3764
+ user: {
3765
+ select: {
3766
+ userId: true
3767
+ }
3768
+ },
3769
+ deviceNotificationToken: true
3770
+ }
3764
3771
  });
3765
3772
  const map = /* @__PURE__ */ new Map();
3766
3773
  for (const r of rows) {
3767
3774
  const token = r.deviceNotificationToken?.trim();
3768
3775
  if (!token) continue;
3769
- if (!map.has(r.userId)) map.set(r.userId, []);
3770
- map.get(r.userId).push(token);
3776
+ if (!map.has(r.user.userId)) map.set(r.user.userId, []);
3777
+ map.get(r.user.userId).push(token);
3771
3778
  }
3772
3779
  for (const [k, v] of map.entries()) map.set(k, Array.from(new Set(v)));
3773
3780
  return map;
package/dist/index.mjs CHANGED
@@ -3704,14 +3704,21 @@ var NotificationService = class {
3704
3704
  deviceNotificationToken: { not: null },
3705
3705
  logoutAt: null
3706
3706
  },
3707
- select: { userId: true, deviceNotificationToken: true }
3707
+ select: {
3708
+ user: {
3709
+ select: {
3710
+ userId: true
3711
+ }
3712
+ },
3713
+ deviceNotificationToken: true
3714
+ }
3708
3715
  });
3709
3716
  const map = /* @__PURE__ */ new Map();
3710
3717
  for (const r of rows) {
3711
3718
  const token = r.deviceNotificationToken?.trim();
3712
3719
  if (!token) continue;
3713
- if (!map.has(r.userId)) map.set(r.userId, []);
3714
- map.get(r.userId).push(token);
3720
+ if (!map.has(r.user.userId)) map.set(r.user.userId, []);
3721
+ map.get(r.user.userId).push(token);
3715
3722
  }
3716
3723
  for (const [k, v] of map.entries()) map.set(k, Array.from(new Set(v)));
3717
3724
  return map;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "av6-core",
3
- "version": "1.7.13",
3
+ "version": "1.7.14",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/index.mjs",
6
6
  "types": "dist/index.d.ts",