wingbot 3.69.3 → 3.69.4
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/package.json
CHANGED
|
@@ -15,7 +15,7 @@ const uuid = require('uuid');
|
|
|
15
15
|
* @typedef {object} Target
|
|
16
16
|
* @prop {string} senderId
|
|
17
17
|
* @prop {string} pageId
|
|
18
|
-
* @prop {
|
|
18
|
+
* @prop {Object<string,object>} [meta]
|
|
19
19
|
*/
|
|
20
20
|
|
|
21
21
|
/**
|
|
@@ -23,7 +23,7 @@ const uuid = require('uuid');
|
|
|
23
23
|
* @prop {string} senderId
|
|
24
24
|
* @prop {string} pageId
|
|
25
25
|
* @prop {string[]} subs
|
|
26
|
-
* @prop {
|
|
26
|
+
* @prop {Object<string,object>} [meta]
|
|
27
27
|
*/
|
|
28
28
|
|
|
29
29
|
/**
|
|
@@ -91,7 +91,7 @@ const uuid = require('uuid');
|
|
|
91
91
|
* @prop {string} senderId
|
|
92
92
|
* @prop {string[]} tags
|
|
93
93
|
* @prop {boolean} [remove]
|
|
94
|
-
* @prop {
|
|
94
|
+
* @prop {Object<string,object>} [meta]
|
|
95
95
|
*/
|
|
96
96
|
|
|
97
97
|
const MAX_TS = 9999999999999;
|
|
@@ -53,7 +53,7 @@ function getFields (info) {
|
|
|
53
53
|
* @prop {string} senderId
|
|
54
54
|
* @prop {string[]} tags
|
|
55
55
|
* @prop {boolean} [remove]
|
|
56
|
-
* @prop {
|
|
56
|
+
* @prop {Object<string,object>} [meta]
|
|
57
57
|
*/
|
|
58
58
|
|
|
59
59
|
/**
|
|
@@ -275,7 +275,7 @@ function notificationsApiFactory (storage, notifications, acl, options = {}) {
|
|
|
275
275
|
* @prop {string} senderId
|
|
276
276
|
* @prop {string[]} tags
|
|
277
277
|
* @prop {boolean} [remove]
|
|
278
|
-
* @prop {
|
|
278
|
+
* @prop {Object<string,object>} [meta]
|
|
279
279
|
*/
|
|
280
280
|
|
|
281
281
|
/**
|
|
@@ -289,7 +289,13 @@ function notificationsApiFactory (storage, notifications, acl, options = {}) {
|
|
|
289
289
|
return null;
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
-
|
|
292
|
+
let { subscriptions } = args;
|
|
293
|
+
|
|
294
|
+
if (typeof options.preprocessSubscribe === 'function') {
|
|
295
|
+
subscriptions = await Promise.resolve(
|
|
296
|
+
options.preprocessSubscribe(subscriptions)
|
|
297
|
+
);
|
|
298
|
+
}
|
|
293
299
|
|
|
294
300
|
await storage.batchSubscribe(subscriptions, true);
|
|
295
301
|
return true;
|