web-manager 4.1.4 → 4.1.6

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.
@@ -256,6 +256,7 @@ class Notifications {
256
256
  try {
257
257
  const firestore = this.manager.firestore();
258
258
  const user = this.manager.auth().getUser();
259
+ const storage = this.manager.storage();
259
260
 
260
261
  if (!token) {
261
262
  return;
@@ -278,8 +279,8 @@ class Notifications {
278
279
 
279
280
  // Determine if we need to update
280
281
  const currentUid = user?.uid || null;
281
- const existingUid = existingData?.uid || null;
282
- const needsUpdate = existingUid !== currentUid;
282
+ const existingOwner = existingData?.owner || null;
283
+ const needsUpdate = existingOwner !== currentUid;
283
284
 
284
285
  // Common data for both create and update
285
286
  const baseData = {
@@ -290,7 +291,7 @@ class Notifications {
290
291
  timestamp,
291
292
  timestampUNIX
292
293
  },
293
- uid: currentUid
294
+ owner: currentUid
294
295
  };
295
296
 
296
297
  // Create or update the document as needed
@@ -300,6 +301,7 @@ class Notifications {
300
301
  ...baseData,
301
302
  token,
302
303
  tags: ['general'],
304
+ attribution: storage.get('attribution', {}),
303
305
  created: {
304
306
  timestamp,
305
307
  timestampUNIX
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "web-manager",
3
- "version": "4.1.4",
3
+ "version": "4.1.6",
4
4
  "description": "Easily access important variables such as the query string, current domain, and current page in a single object.",
5
5
  "main": "dist/index.js",
6
6
  "module": "src/index.js",