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:
parent
c3eea4d6eb
commit
8cbe374271
1 changed files with 3 additions and 0 deletions
|
|
@ -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');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue