wingbot 3.69.0 → 3.69.2
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
|
@@ -162,6 +162,7 @@ class Notifications extends EventEmitter {
|
|
|
162
162
|
// ensure unique timestamps for messages
|
|
163
163
|
this._lts = new Map();
|
|
164
164
|
|
|
165
|
+
this._preprocessSubscribe = options.preprocessSubscribe;
|
|
165
166
|
this._preprocessSubscribers = options.preprocessSubscribers;
|
|
166
167
|
this._preprocessSubscriptions = options.preprocessSubscriptions;
|
|
167
168
|
}
|
|
@@ -177,7 +178,8 @@ class Notifications extends EventEmitter {
|
|
|
177
178
|
api (acl = null) {
|
|
178
179
|
const options = {
|
|
179
180
|
preprocessSubscribers: this._preprocessSubscribers,
|
|
180
|
-
preprocessSubscriptions: this._preprocessSubscriptions
|
|
181
|
+
preprocessSubscriptions: this._preprocessSubscriptions,
|
|
182
|
+
preprocessSubscribe: this._preprocessSubscribe
|
|
181
183
|
};
|
|
182
184
|
return api(this._storage, this, acl, options);
|
|
183
185
|
}
|
|
@@ -412,6 +414,13 @@ class Notifications extends EventEmitter {
|
|
|
412
414
|
* @returns {Promise<SenderSubscription[]>}
|
|
413
415
|
*/
|
|
414
416
|
async getSubscriptions (senderId, pageId) {
|
|
417
|
+
if (typeof this._storage.getSenderSubscriptions !== 'function') {
|
|
418
|
+
const tags = await this._storage.getSenderSubscribtions(senderId, pageId);
|
|
419
|
+
return tags.map((tag) => ({
|
|
420
|
+
tag,
|
|
421
|
+
meta: {}
|
|
422
|
+
}));
|
|
423
|
+
}
|
|
415
424
|
return this._storage.getSenderSubscriptions(senderId, pageId);
|
|
416
425
|
}
|
|
417
426
|
|