mirror of
https://github.com/aljazceru/nostr-profile-manager.git
synced 2025-12-17 05:34:20 +01:00
feat: save event even when publishing fails
improve resiliency so that events are saved (backuped) before sending to relays
This commit is contained in:
@@ -306,6 +306,7 @@ export const getContactName = (pubkey: string): string => {
|
||||
};
|
||||
|
||||
export const publishEvent = async (event: Event): Promise<boolean> => {
|
||||
storeMyProfileEvent(event);
|
||||
const r = await publishEventToRelay(
|
||||
event,
|
||||
[
|
||||
@@ -317,7 +318,6 @@ export const publishEvent = async (event: Event): Promise<boolean> => {
|
||||
'wss://relay.snort.social',
|
||||
],
|
||||
);
|
||||
if (r) storeMyProfileEvent(event);
|
||||
return r;
|
||||
};
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user