File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -1686,20 +1686,13 @@ export class WAStartupService {
16861686 if ( options ?. mentions ) {
16871687 this . logger . verbose ( 'Mentions defined' ) ;
16881688
1689- if (
1690- ! Array . isArray ( options . mentions . mentioned ) &&
1691- ! options . mentions . everyOne
1692- ) {
1693- throw new BadRequestException ( 'Mentions must be an array' ) ;
1694- }
1695-
1696- if ( options . mentions . everyOne ) {
1689+ if ( options . mentions ?. everyOne ) {
16971690 this . logger . verbose ( 'Mentions everyone' ) ;
16981691
16991692 this . logger . verbose ( 'Getting group metadata' ) ;
17001693 mentions = groupMetadata . participants . map ( ( participant ) => participant . id ) ;
17011694 this . logger . verbose ( 'Getting group metadata for mentions' ) ;
1702- } else {
1695+ } else if ( options . mentions ?. mentioned ?. length ) {
17031696 this . logger . verbose ( 'Mentions manually defined' ) ;
17041697 mentions = options . mentions . mentioned . map ( ( mention ) => {
17051698 const jid = this . createJid ( mention ) ;
You can’t perform that action at this time.
0 commit comments