File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2969,7 +2969,9 @@ export class WAStartupService {
29692969 public async createGroup ( create : CreateGroupDto ) {
29702970 this . logger . verbose ( 'Creating group: ' + create . subject ) ;
29712971 try {
2972- const participants = create . participants . map ( ( p ) => this . createJid ( p ) ) ;
2972+ const participants = ( await this . whatsappNumber ( { numbers : create . participants } ) )
2973+ . filter ( ( participant ) => participant . exists )
2974+ . map ( ( participant ) => participant . jid ) ;
29732975 const { id } = await this . client . groupCreate ( create . subject , participants ) ;
29742976 this . logger . verbose ( 'Group created: ' + id ) ;
29752977
@@ -2979,16 +2981,16 @@ export class WAStartupService {
29792981 }
29802982
29812983 if ( create ?. promoteParticipants ) {
2982- this . logger . verbose ( 'Prometing group participants: ' + create . description ) ;
2984+ this . logger . verbose ( 'Prometing group participants: ' + participants ) ;
29832985 await this . updateGParticipant ( {
29842986 groupJid : id ,
29852987 action : 'promote' ,
29862988 participants : participants ,
29872989 } ) ;
29882990 }
29892991
2990- const group = await this . client . groupMetadata ( id ) ;
29912992 this . logger . verbose ( 'Getting group metadata' ) ;
2993+ const group = await this . client . groupMetadata ( id ) ;
29922994
29932995 return group ;
29942996 } catch ( error ) {
You can’t perform that action at this time.
0 commit comments