mirror of
https://github.com/purrgrammer/grimoire.git
synced 2026-04-12 08:27:27 +02:00
refactor(post): use Promise.allSettled for relay publishing
Use Promise.allSettled instead of Promise.all to wait for all relay publish attempts to complete, regardless of individual success/failure. More defensive and semantically correct since we're handling errors individually per relay and want all attempts to finish.
This commit is contained in:
@@ -480,8 +480,8 @@ export function PostViewer({ windowId }: PostViewerProps = {}) {
|
||||
}
|
||||
});
|
||||
|
||||
// Wait for all publishes to complete
|
||||
await Promise.all(publishPromises);
|
||||
// Wait for all publishes to complete (settled = all finished, regardless of success/failure)
|
||||
await Promise.allSettled(publishPromises);
|
||||
|
||||
// Add to event store for immediate local availability
|
||||
eventStore.add(event);
|
||||
|
||||
Reference in New Issue
Block a user