@@ -2364,6 +2364,9 @@ export class WAStartupService {
23642364 public async fetchMessages ( query : MessageQuery ) {
23652365 this . logger . verbose ( 'Fetching messages' ) ;
23662366 if ( query ?. where ) {
2367+ if ( query . where ?. key ?. remoteJid ) {
2368+ query . where . key . remoteJid = this . createJid ( query . where . key . remoteJid ) ;
2369+ }
23672370 query . where . owner = this . instance . name ;
23682371 } else {
23692372 query = {
@@ -2379,6 +2382,9 @@ export class WAStartupService {
23792382 public async fetchStatusMessage ( query : MessageUpQuery ) {
23802383 this . logger . verbose ( 'Fetching status messages' ) ;
23812384 if ( query ?. where ) {
2385+ if ( query . where ?. remoteJid ) {
2386+ query . where . remoteJid = this . createJid ( query . where . remoteJid ) ;
2387+ }
23822388 query . where . owner = this . instance . name ;
23832389 } else {
23842390 query = {
@@ -2423,8 +2429,19 @@ export class WAStartupService {
24232429 this . logger . verbose ( 'Groups add privacy updated' ) ;
24242430
24252431 // reinicia a instancia
2432+ this . client ?. ws ?. close ( ) ;
24262433
2427- return { update : 'success' , data : await this . client . fetchPrivacySettings ( ) } ;
2434+ return {
2435+ update : 'success' ,
2436+ data : {
2437+ readreceipts : settings . privacySettings . readreceipts ,
2438+ profile : settings . privacySettings . profile ,
2439+ status : settings . privacySettings . status ,
2440+ online : settings . privacySettings . online ,
2441+ last : settings . privacySettings . last ,
2442+ groupadd : settings . privacySettings . groupadd ,
2443+ } ,
2444+ } ;
24282445 } catch ( error ) {
24292446 throw new InternalServerErrorException (
24302447 'Error updating privacy settings' ,
0 commit comments