const current = svh.schemaVersionObjectToNumber(currentSchema);
const min = svh.schemaVersionObjectToNumber(this.schemaVersionsSupported.min);
const max = svh.schemaVersionObjectToNumber(this.schemaVersionsSupported.max);
- if (min >= current && max <= current) {
+ if (current >= min && current <= max) {
this.logger.debug(_scope, 'schema supported', { currentSchema, schemaVersionsSupported: this.schemaVersionsSupported });
} else {
this.logger.error(_scope, 'schema not supported', { currentSchema, schemaVersionsSupported: this.schemaVersionsSupported });
}
+ /**
+ * Remove any expired subscriptions to a topic.
+ * @param {*} dbCtx
+ * @param {*} topicId
+ */
+ async subscriptionDeleteExpired(dbCtx, topicId) {
+ this._notImplemented('subscriptionDeleteExpired', arguments);
+ }
+
+
/**
* Claim subscriptions needing content updates attempted.
* @param {*} dbCtx
this._notImplemented('topicGetAll', arguments);
}
+
/**
* Get topic data, without content.
* @param {*} dbCtx
this._notImplemented('topicGetContentById', arguments);
}
- // /**
- // * Call after an unsubscribe, to check if a topic is awaiting deletion, and that
- // * was the last subscription belaying it.
- // * @param {String|Integer} data topic url or id
- // */
- // async topicPendingDelete(dbCtx, data) {
- // this._notImplemented('topicPendingDelete', arguments);
- // }
+
+ /**
+ * Attempt to delete a topic, which must be set isDeleted, if there
+ * are no more subscriptions belaying its removal.
+ * @param {*} topicId
+ */
+ async topicPendingDelete(dbCtx, topicId) {
+ this._notImplemented('topicPendingDelete', arguments);
+ }
+
+
+ /**
+ * Return an array of the counts of the last #days of topic updates.
+ * @param {*} dbCtx
+ * @param {*} topicId
+ * @param {Number} days
+ * @returns {Number[]}
+ */
+ async topicPublishHistory(dbCtx, topicId, days) {
+ this._notImplemented('topicPublishHistory', arguments);
+ }
/**
/**
* Updates a topic's content data and content update timestamp.
* @param {Object} data
- * @param {Integer} data.topicId
+ * @param {*} data.topicId
* @param {String} data.content
* @param {String} data.contentHash
* @param {String=} data.contentType