Skip to content

Commit

Permalink
fix type issue on event.content
Browse files Browse the repository at this point in the history
  • Loading branch information
dskvr committed Jul 27, 2024
1 parent 1a3ccba commit 696917e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion apps/nocapd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion internal/publisher/package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
8 changes: 5 additions & 3 deletions internal/publisher/src/kinds/Kind30166.js
Original file line number Diff line number Diff line change
Expand Up @@ -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){
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 696917e

Please sign in to comment.