feat(chat): free-form GRUPPE channels with mutable participants
- ChatChannelType.GRUPPE: created by Leitungsteam (any KC) or a Gemeinde Verantwortliche/r (own KC), mixing team users and guests/Konfis as explicit ChatParticipant rows (unlike GEMEINDE_GRUPPE, membership is not derived from Gemeinde) - POST /chat/:kcId/gruppen to create, GET participant-candidates, and POST/DELETE /chat/gruppen/:channelId/participants to manage membership (creator, LT, or Verantwortliche/r of that KC) - ChatGateway broadcasts chat:participants-changed on membership change - PushService updated for nullable ChatParticipant.userId + new guestAccountId column - SyncService now replicates ChatParticipant - Prisma migration + 14 new unit tests (75/75 passing), tsc clean - CI: add .gitea/workflows/cybedefend-scan.yml + .cybedefend project config
This commit is contained in:
@@ -106,4 +106,12 @@ export class ChatGateway implements OnGatewayConnection, OnGatewayDisconnect {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// Called by ChatController after add/removeParticipant so anyone with the
|
||||
/// channel already open (e.g. the creator's participant-management UI)
|
||||
/// gets a live update. Newly added participants join the room themselves
|
||||
/// via `chat:join` once they open the chat.
|
||||
notifyParticipantsChanged(channelId: string) {
|
||||
this.broadcast(channelId, { event: 'chat:participants-changed', data: { channelId } });
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user