diff --git a/apps/nocapd/package.json b/apps/nocapd/package.json index f96c7558..f80308dd 100644 --- a/apps/nocapd/package.json +++ b/apps/nocapd/package.json @@ -12,7 +12,7 @@ "@nostrwatch/nocap": "0.5.3", "@nostrwatch/nocap-every-adapter-default": "1.4.0", "@nostrwatch/nwcache": "0.1.2", - "@nostrwatch/publisher": "0.5.4", + "@nostrwatch/publisher": "0.5.5", "@nostrwatch/seed": "0.0.2", "@nostrwatch/utils": "0.1.3", "bluebird": "3.7.2", diff --git a/internal/publisher/package.json b/internal/publisher/package.json index 6461a8b0..cc5d4122 100644 --- a/internal/publisher/package.json +++ b/internal/publisher/package.json @@ -1,6 +1,6 @@ { "name": "@nostrwatch/publisher", - "version": "0.5.4", + "version": "0.5.5", "type": "module", "description": "Library for publishing nostr.watch relay status and publisher registration events", "main": "index.js", diff --git a/internal/publisher/src/kinds/Kind30166.js b/internal/publisher/src/kinds/Kind30166.js index 0fe845ad..31593a67 100644 --- a/internal/publisher/src/kinds/Kind30166.js +++ b/internal/publisher/src/kinds/Kind30166.js @@ -12,19 +12,21 @@ export class Kind30166 extends PublisherNocap { } generateEvent(data){ + let content const tags = Kind30166.generateTags(data) - let content = {} try { - content = JSON.stringify(data?.info?.data) + content = `${JSON.stringify(data?.info?.data)}` } catch (e) { + content = "{}" this.logger.err(`generateEvent(): Error: ${e}`) this.logger.info(data) } - return { + const event = { ...this.tpl(), content, tags } + return event } static generateTags(data){ diff --git a/package.json b/package.json index 7dd67890..1b1a14f5 100644 --- a/package.json +++ b/package.json @@ -4,8 +4,7 @@ "version": "0.2.0", "scripts": { "packages:update": "node ./scripts/upkg.js", - "deploy:nocapd@all": "ansible-playbook .ansible/nocapd/deploy.yaml -i .ansible/inventories/frankfurt -i .ansible/inventories/johannesburg -i .ansible/inventories/amsterdam -i .ansible/inventories/mumbai -i .ansible/inventories/newyork -i .ansible/inventories/saopaulo -i .ansible/inventories/seoul -i .ansible/inventories/siliconvalley -i .ansible/inventories/sydney", - "deploy:nocapd@frankfurt": "ansible-playbook .ansible/nocapd/deploy.yaml -i .ansible/inventories/frankfurt --ask-become-pass", + "deploy:nocapd@all": "ansible-playbook .ansible/nocapd/deploy.yaml -i .ansible/inventories/johannesburg -i .ansible/inventories/amsterdam -i .ansible/inventories/mumbai -i .ansible/inventories/newyork -i .ansible/inventories/saopaulo -i .ansible/inventories/seoul -i .ansible/inventories/siliconvalley -i .ansible/inventories/sydney", "deploy:nocapd@amsterdam": "ansible-playbook .ansible/nocapd/deploy.yaml -i .ansible/inventories/amsterdam", "deploy:nocapd@newyork": "ansible-playbook .ansible/nocapd/deploy.yaml -i .ansible/inventories/newyork", "deploy:nocapd@mumbai": "ansible-playbook .ansible/nocapd/deploy.yaml -i .ansible/inventories/mumbai",