mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-14 09:51:24 -06:00
fix: fix in update settings that needed to restart after updated
This commit is contained in:
parent
5121374d60
commit
763e30bd1d
@ -1,3 +1,9 @@
|
||||
# 1.3.2 (homolog)
|
||||
|
||||
### Fixed
|
||||
|
||||
* Fix in update settings that needed to restart after updated
|
||||
|
||||
# 1.3.1 (2023-07-20 07:48)
|
||||
|
||||
### Fixed
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "evolution-api",
|
||||
"version": "1.3.1",
|
||||
"version": "1.3.2",
|
||||
"description": "Rest api for communication with WhatsApp",
|
||||
"main": "./dist/src/main.js",
|
||||
"scripts": {
|
||||
|
@ -2364,6 +2364,9 @@ export class WAStartupService {
|
||||
public async fetchMessages(query: MessageQuery) {
|
||||
this.logger.verbose('Fetching messages');
|
||||
if (query?.where) {
|
||||
if (query.where?.key?.remoteJid) {
|
||||
query.where.key.remoteJid = this.createJid(query.where.key.remoteJid);
|
||||
}
|
||||
query.where.owner = this.instance.name;
|
||||
} else {
|
||||
query = {
|
||||
@ -2379,6 +2382,9 @@ export class WAStartupService {
|
||||
public async fetchStatusMessage(query: MessageUpQuery) {
|
||||
this.logger.verbose('Fetching status messages');
|
||||
if (query?.where) {
|
||||
if (query.where?.remoteJid) {
|
||||
query.where.remoteJid = this.createJid(query.where.remoteJid);
|
||||
}
|
||||
query.where.owner = this.instance.name;
|
||||
} else {
|
||||
query = {
|
||||
@ -2423,8 +2429,19 @@ export class WAStartupService {
|
||||
this.logger.verbose('Groups add privacy updated');
|
||||
|
||||
// reinicia a instancia
|
||||
this.client?.ws?.close();
|
||||
|
||||
return { update: 'success', data: await this.client.fetchPrivacySettings() };
|
||||
return {
|
||||
update: 'success',
|
||||
data: {
|
||||
readreceipts: settings.privacySettings.readreceipts,
|
||||
profile: settings.privacySettings.profile,
|
||||
status: settings.privacySettings.status,
|
||||
online: settings.privacySettings.online,
|
||||
last: settings.privacySettings.last,
|
||||
groupadd: settings.privacySettings.groupadd,
|
||||
},
|
||||
};
|
||||
} catch (error) {
|
||||
throw new InternalServerErrorException(
|
||||
'Error updating privacy settings',
|
||||
|
Loading…
Reference in New Issue
Block a user