X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=src%2Fcommunication.js;h=dc4d464c70111b4ea2a8971575940c099d14b379;hb=d5e7908d3e60ee0cb3149163d4749563cdfafeb3;hp=097da637bd418d4d655f04aa65651ad5df709e5d;hpb=9812213260e952ae601f94ab0915c680e8c80495;p=websub-hub diff --git a/src/communication.js b/src/communication.js index 097da63..dc4d464 100644 --- a/src/communication.js +++ b/src/communication.js @@ -57,7 +57,7 @@ class Communication { static userAgentString(userAgentConfig) { // eslint-disable-next-line security/detect-object-injection const _conf = (field, def) => (userAgentConfig && field in userAgentConfig) ? userAgentConfig[field] : def; - const product = _conf('product', packageName); + const product = _conf('product', packageName).split('/').pop(); const version = _conf('version', packageVersion); let implementation = _conf('implementation', Enum.Specification); if (implementation) { @@ -443,7 +443,7 @@ class Communication { // Cull any expired subscriptions await this.db.subscriptionDeleteExpired(dbCtx, topicId); - logInfoData.url = topicId.url; + logInfoData.url = topic.url; if (topic.isDeleted) { this.logger.debug(_scope, 'topic deleted, skipping update request', logInfoData); @@ -565,7 +565,7 @@ class Communication { await this.db.transaction(dbCtx, async (txCtx) => { await this.db.verificationInsert(txCtx, verification); - await this.db.subscriptionDeliveryComplete(txCtx, subscription.callback, subscription.topicId); + await this.db.subscriptionDeliveryComplete(txCtx, subscription.callback, subscription.topicId, topic.contentUpdated); }); this.logger.info(_scope, 'update unsubscription for deleted topic', logInfoData); return; @@ -617,7 +617,7 @@ class Communication { return; } - await this.db.subscriptionDeliveryComplete(dbCtx, subscription.callback, subscription.topicId); + await this.db.subscriptionDeliveryComplete(dbCtx, subscription.callback, subscription.topicId, topic.contentUpdated); this.logger.info(_scope, 'update success', logInfoData); }