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
This commit is contained in:
@ -178,7 +178,7 @@ export class EventPublisher {
|
|||||||
fnExtra?: EventBuilderHook,
|
fnExtra?: EventBuilderHook,
|
||||||
) {
|
) {
|
||||||
const eb = this.#eb(EventKind.ZapRequest);
|
const eb = this.#eb(EventKind.ZapRequest);
|
||||||
eb.content(msg ?? "");
|
eb.content(msg?.trim() ?? "");
|
||||||
if (note) {
|
if (note) {
|
||||||
// HACK: remove relay tag, some zap services dont like relay tags
|
// HACK: remove relay tag, some zap services dont like relay tags
|
||||||
eb.tag(unwrap(note.toEventTag()).slice(0, 2));
|
eb.tag(unwrap(note.toEventTag()).slice(0, 2));
|
||||||
|
Reference in New Issue
Block a user