mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-12-01 00:43:15 +00:00
fix(journey): keep draft edits and share screens scoped to their source
Preserve typed titles until submit, require a valid photo preview, and clear entry and photo overlays when following another public share link. Keep committed drafts successful if realtime delivery fails.
This commit is contained in:
@@ -274,7 +274,12 @@ export class JourneyEntriesFromPhotosService {
|
||||
});
|
||||
|
||||
for (const { entry } of done.written) {
|
||||
await this.journeys.broadcastJourneyEvent(journeyId, 'journey:entry:created', { entry }, socketId);
|
||||
try {
|
||||
await this.journeys.broadcastJourneyEvent(journeyId, 'journey:entry:created', { entry }, socketId);
|
||||
} catch (err) {
|
||||
// The drafts are committed. A failed notification cannot undo the write.
|
||||
this.logger.warn(`draft entry event failed: ${err instanceof Error ? err.message : String(err)}`);
|
||||
}
|
||||
}
|
||||
return {
|
||||
entries: done.written.map(({ entry, photoCount }) => ({
|
||||
|
||||
Reference in New Issue
Block a user