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 @@ -4077,7 +4077,19 @@ export class WAStartupService {
40774077 this . logger . verbose ( 'Fetching participants for group: ' + id . groupJid ) ;
40784078 try {
40794079 const participants = ( await this . client . groupMetadata ( id . groupJid ) ) . participants ;
4080- return { participants } ;
4080+ const contacts = await this . repository . contact . findManyById ( {
4081+ owner : this . instance . name ,
4082+ ids : participants . map ( ( p ) => p . id ) ,
4083+ } ) ;
4084+ const parsedParticipants = participants . map ( ( participant ) => {
4085+ const contact = contacts . find ( ( c ) => c . id === participant . id ) ;
4086+ return {
4087+ ...participant ,
4088+ name : participant . name ?? contact ?. pushName ,
4089+ imgUrl : participant . imgUrl ?? contact ?. profilePictureUrl ,
4090+ } ;
4091+ } ) ;
4092+ return { participants : parsedParticipants } ;
40814093 } catch ( error ) {
40824094 throw new NotFoundException ( 'No participants' , error . toString ( ) ) ;
40834095 }
You can’t perform that action at this time.
0 commit comments