From 9b5721faa401284a0d0b7134d51f146c0a620958 Mon Sep 17 00:00:00 2001 From: benthecarman <15256660+benthecarman@users.noreply.github.com> Date: Sat, 11 Nov 2023 15:12:24 -0600 Subject: [PATCH] Trim Zap comment We had a bug when trying to parse the json of a comment. It had a \n at the end of it and a browser's json parser couldn't handle it. This should fix --- packages/system/src/event-publisher.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/system/src/event-publisher.ts b/packages/system/src/event-publisher.ts index 14cc9f78e..5210df368 100644 --- a/packages/system/src/event-publisher.ts +++ b/packages/system/src/event-publisher.ts @@ -178,7 +178,7 @@ export class EventPublisher { fnExtra?: EventBuilderHook, ) { const eb = this.#eb(EventKind.ZapRequest); - eb.content(msg ?? ""); + eb.content(msg?.trim() ?? ""); if (note) { // HACK: remove relay tag, some zap services dont like relay tags eb.tag(unwrap(note.toEventTag()).slice(0, 2));