From 9b17f63effb1afdae0b3b1282f99c87697a4b899 Mon Sep 17 00:00:00 2001 From: dskvr Date: Sat, 27 Jul 2024 18:05:54 +0200 Subject: [PATCH] include stingified NIP-11 when available --- apps/nocapd/package.json | 2 +- internal/publisher/package.json | 2 +- internal/publisher/src/kinds/Kind30166.js | 8 ++++++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/apps/nocapd/package.json b/apps/nocapd/package.json index 3089b35d..0a851e2c 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.1", + "@nostrwatch/publisher": "0.5.2", "@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 4e0896f6..0f9f2dbb 100644 --- a/internal/publisher/package.json +++ b/internal/publisher/package.json @@ -1,6 +1,6 @@ { "name": "@nostrwatch/publisher", - "version": "0.5.1", + "version": "0.5.2", "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 2c3d5156..0dacccbb 100644 --- a/internal/publisher/src/kinds/Kind30166.js +++ b/internal/publisher/src/kinds/Kind30166.js @@ -12,8 +12,16 @@ export class Kind30166 extends PublisherNocap { generateEvent(data){ const tags = Kind30166.generateTags(data) + let content = {} + try { + content = JSON.stringify(data?.info?.data) + } catch (e) { + this.logger.err(`generateEvent(): Error: ${e}`) + this.logger.info(data) + } return { ...this.tpl(), + content, tags } }