File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -4081,7 +4081,19 @@ export class WAStartupService {
40814081 this . logger . verbose ( 'Fetching participants for group: ' + id . groupJid ) ;
40824082 try {
40834083 const participants = ( await this . client . groupMetadata ( id . groupJid ) ) . participants ;
4084- return { participants } ;
4084+ const contacts = await this . repository . contact . findManyById ( {
4085+ owner : this . instance . name ,
4086+ ids : participants . map ( ( p ) => p . id ) ,
4087+ } ) ;
4088+ const parsedParticipants = participants . map ( ( participant ) => {
4089+ const contact = contacts . find ( ( c ) => c . id === participant . id ) ;
4090+ return {
4091+ ...participant ,
4092+ name : participant . name ?? contact ?. pushName ,
4093+ imgUrl : participant . imgUrl ?? contact ?. profilePictureUrl ,
4094+ } ;
4095+ } ) ;
4096+ return { participants : parsedParticipants } ;
40854097 } catch ( error ) {
40864098 throw new NotFoundException ( 'No participants' , error . toString ( ) ) ;
40874099 }
You can’t perform that action at this time.
0 commit comments