File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3073,7 +3073,9 @@ export class WAStartupService {
30733073 public async createGroup ( create : CreateGroupDto ) {
30743074 this . logger . verbose ( 'Creating group: ' + create . subject ) ;
30753075 try {
3076- const participants = create . participants . map ( ( p ) => this . createJid ( p ) ) ;
3076+ const participants = ( await this . whatsappNumber ( { numbers : create . participants } ) )
3077+ . filter ( ( participant ) => participant . exists )
3078+ . map ( ( participant ) => participant . jid ) ;
30773079 const { id } = await this . client . groupCreate ( create . subject , participants ) ;
30783080 this . logger . verbose ( 'Group created: ' + id ) ;
30793081
@@ -3083,16 +3085,16 @@ export class WAStartupService {
30833085 }
30843086
30853087 if ( create ?. promoteParticipants ) {
3086- this . logger . verbose ( 'Prometing group participants: ' + create . description ) ;
3088+ this . logger . verbose ( 'Prometing group participants: ' + participants ) ;
30873089 await this . updateGParticipant ( {
30883090 groupJid : id ,
30893091 action : 'promote' ,
30903092 participants : participants ,
30913093 } ) ;
30923094 }
30933095
3094- const group = await this . client . groupMetadata ( id ) ;
30953096 this . logger . verbose ( 'Getting group metadata' ) ;
3097+ const group = await this . client . groupMetadata ( id ) ;
30963098
30973099 return group ;
30983100 } catch ( error ) {
You can’t perform that action at this time.
0 commit comments