fix: add fromMember validation in CrossTeamService

Prevent empty or missing fromMember values from being accepted
in cross-team message requests.
This commit is contained in:
iliya 2026-03-09 19:18:18 +02:00
parent c3eea4d6eb
commit 8cbe374271

View file

@ -52,6 +52,9 @@ export class CrossTeamService {
if (fromTeam === toTeam) {
throw new Error('Cannot send cross-team message to the same team');
}
if (!fromMember || typeof fromMember !== 'string' || fromMember.trim().length === 0) {
throw new Error('fromMember is required');
}
if (!text || typeof text !== 'string' || text.trim().length === 0) {
throw new Error('Message text is required');
}