web-manager 4.1.4 → 4.1.5
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.
|
@@ -278,8 +278,8 @@ class Notifications {
|
|
|
278
278
|
|
|
279
279
|
// Determine if we need to update
|
|
280
280
|
const currentUid = user?.uid || null;
|
|
281
|
-
const
|
|
282
|
-
const needsUpdate =
|
|
281
|
+
const existingOwner = existingData?.owner || null;
|
|
282
|
+
const needsUpdate = existingOwner !== currentUid;
|
|
283
283
|
|
|
284
284
|
// Common data for both create and update
|
|
285
285
|
const baseData = {
|
|
@@ -290,7 +290,7 @@ class Notifications {
|
|
|
290
290
|
timestamp,
|
|
291
291
|
timestampUNIX
|
|
292
292
|
},
|
|
293
|
-
|
|
293
|
+
owner: currentUid
|
|
294
294
|
};
|
|
295
295
|
|
|
296
296
|
// Create or update the document as needed
|
|
@@ -300,6 +300,7 @@ class Notifications {
|
|
|
300
300
|
...baseData,
|
|
301
301
|
token,
|
|
302
302
|
tags: ['general'],
|
|
303
|
+
// TODO: add attribution data on create
|
|
303
304
|
created: {
|
|
304
305
|
timestamp,
|
|
305
306
|
timestampUNIX
|
package/package.json
CHANGED