v0.12.33 text cleanup of the app and bug fixes.

This commit is contained in:
2026-03-28 12:55:53 -04:00
parent eb3e45d88f
commit fb9d4dc956
12 changed files with 124 additions and 49 deletions

View File

@@ -281,11 +281,15 @@ router.post('/:id/members', authMiddleware, async (req, res) => {
);
sysMsg.reactions = [];
io.to(R(req.schema,'group',group.id)).emit('message:new', sysMsg);
// Regenerate composite if pre-add count was ≤3 and group is non-managed private
if (!group.is_managed && !group.is_direct && parseInt(preAddCount.cnt) <= 3) {
const newTotal = parseInt(preAddCount.cnt) + 1;
if (newTotal >= 3) {
await computeAndStoreComposite(req.schema, group.id);
// For non-managed private groups, always notify existing members of the updated group,
// and regenerate composite when pre-add count was ≤3 and new total reaches ≥3.
if (!group.is_managed && !group.is_direct) {
const preCount = parseInt(preAddCount.cnt);
if (preCount <= 3) {
const newTotal = preCount + 1;
if (newTotal >= 3) {
await computeAndStoreComposite(req.schema, group.id);
}
}
await emitGroupUpdated(req.schema, io, group.id);
}