mirror of
https://github.com/mauriceboe/TREK.git
synced 2026-11-14 00:01:03 +00:00
fix(vacay): the opened year's broadcast skips the socket the change came from, like every other
The app only sets days in the years it shows, so the tab that made the change never needs the new year; the assistant, MCP and plugins send no socket and reach everyone.
This commit is contained in:
@@ -1134,7 +1134,7 @@ export class VacayService {
|
||||
else await this.entries.insertEntry(planId, userId, date, '', frac, knd);
|
||||
return this.ensureYearOf(planId, userId, date);
|
||||
});
|
||||
if (opened) await this.notifyPlanUsers(planId, undefined, 'vacay:settings');
|
||||
if (opened) await this.notifyPlanUsers(planId, socketId, 'vacay:settings');
|
||||
await this.notifyPlanUsers(planId, socketId);
|
||||
return { action: existing ? 'updated' : 'added', fraction: frac, kind: knd };
|
||||
}
|
||||
@@ -1172,7 +1172,7 @@ export class VacayService {
|
||||
if (owner) opened = await this.ensureYearOf(planId, owner.owner_id, date);
|
||||
return { action: existing ? 'updated' : 'added', fraction: frac };
|
||||
});
|
||||
if (opened) await this.notifyPlanUsers(planId, undefined, 'vacay:settings');
|
||||
if (opened) await this.notifyPlanUsers(planId, socketId, 'vacay:settings');
|
||||
await this.notifyPlanUsers(planId, socketId);
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user