Skip to content

Commit

Permalink
publisher hotfix2
Browse files Browse the repository at this point in the history
  • Loading branch information
dskvr committed Jul 27, 2024
1 parent 3300ddc commit fef9c71
Show file tree
Hide file tree
Showing 4 changed files with 185 additions and 232 deletions.
4 changes: 2 additions & 2 deletions apps/nocapd/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
"@nostrwatch/controlflow": "0.2.1",
"@nostrwatch/logger": "0.0.6",
"@nostrwatch/nocap": "0.5.3",
"@nostrwatch/nocap-every-adapter-default": "1.4.0",
"@nostrwatch/nocap-every-adapter-default": "1.4.1",
"@nostrwatch/nwcache": "0.1.2",
"@nostrwatch/publisher": "0.5.8",
"@nostrwatch/publisher": "0.5.9",
"@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.8",
"version": "0.5.9",
"type": "module",
"description": "Library for publishing nostr.watch relay status and publisher registration events",
"main": "index.js",
Expand Down
19 changes: 12 additions & 7 deletions internal/publisher/src/kinds/Kind30166.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,25 @@ export class Kind30166 extends PublisherNocap {
}

generateEvent(check){
let content
let content = "{}"
const tags = Kind30166.generateTags(check)
try {
content = `${JSON.stringify(check.info?.data)}`
} catch (e) {
content = "{}"
this.logger.err(`generateEvent(): Error: ${e}`)
this.logger.info(check.info?.data)
const nip11 = check.info?.data

if(nip11) {
try {
content = `${JSON.stringify(nip11)}`
} catch (e) {
this.logger.err(`generateEvent(): Error: ${e}`)
this.logger.info(nip11)
}
}

const event = {
...this.tpl(),
content,
tags
}

return event
}

Expand Down
Loading

0 comments on commit fef9c71

Please sign in to comment.