From 85f526d1d492a05cb42a05a0f13e1a28596795b1 Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Sat, 13 May 2023 21:07:36 -0500 Subject: [PATCH] Sign Nostr event with ditto --- app/soapbox/actions/streaming.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/soapbox/actions/streaming.ts b/app/soapbox/actions/streaming.ts index c96de40e3..b42ebfd78 100644 --- a/app/soapbox/actions/streaming.ts +++ b/app/soapbox/actions/streaming.ts @@ -181,12 +181,12 @@ const connectTimelineStream = ( case 'marker': dispatch({ type: MARKER_FETCH_SUCCESS, marker: JSON.parse(data.payload) }); break; - case 'nostr:signEvent': + case 'nostr.sign': (async () => { const event = await window.nostr?.signEvent(JSON.parse(data.payload)); if (event) { - websocket.send(JSON.stringify({ event: 'nostr:event', payload: event })); + websocket.send(JSON.stringify({ event: 'nostr.sign', payload: JSON.stringify(event) })); } })(); break; @@ -201,7 +201,7 @@ const refreshHomeTimelineAndNotification = (dispatch: AppDispatch, done?: () => dispatch(fetchAnnouncements(done)))))); const connectUserStream = (opts?: StreamOpts) => - connectTimelineStream('home', 'user', refreshHomeTimelineAndNotification, null, opts); + connectTimelineStream('home', `user${'nostr' in window ? '&nostr=true' : ''}`, refreshHomeTimelineAndNotification, null, opts); const connectCommunityStream = ({ onlyMedia }: Record = {}) => connectTimelineStream(`community${onlyMedia ? ':media' : ''}`, `public:local${onlyMedia ? ':media' : ''}`);