Skip to content

Commit

Permalink
feat: save event even when publishing fails
Browse files Browse the repository at this point in the history
improve resiliency so that events are saved (backuped) before sending to relays
  • Loading branch information
DanConwayDev committed Mar 19, 2024
1 parent c5ece25 commit e73f124
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/fetchEvents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,14 +302,14 @@ export const getContactName = (pubkey: string): string => {
};

export const publishEvent = async (event: Event): Promise<boolean> => {
storeMyProfileEvent(event);
const r = await publishEventToRelay(
event,
[
...getRelays(),
'wss://nostr.mutinywallet.com', // blastr
],
);
if (r) storeMyProfileEvent(event);
return r;
};
/**
Expand Down

0 comments on commit e73f124

Please sign in to comment.