mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-15 19:52:54 -06:00
fix: Fixed validation is set settings
This commit is contained in:
parent
757a578c6e
commit
b77f22790b
@ -1517,16 +1517,14 @@ export class WAStartupService {
|
|||||||
.split(/\:/)[0]
|
.split(/\:/)[0]
|
||||||
.split('@')[0];
|
.split('@')[0];
|
||||||
|
|
||||||
// Verificação de Grupos Antigos
|
if (number.includes('-') && number.length >= 24) {
|
||||||
if(number.includes('-') && number.length >= 24){
|
|
||||||
this.logger.verbose('Jid created is group: ' + `${number}@g.us`);
|
this.logger.verbose('Jid created is group: ' + `${number}@g.us`);
|
||||||
number = number.replace(/[^\d-]/g, '');
|
number = number.replace(/[^\d-]/g, '');
|
||||||
return `${number}@g.us`;
|
return `${number}@g.us`;
|
||||||
}
|
}
|
||||||
|
|
||||||
number = number.replace(/\D/g, '');
|
number = number.replace(/\D/g, '');
|
||||||
|
|
||||||
// Verificação de Grupos Novos
|
|
||||||
if (number.length >= 18) {
|
if (number.length >= 18) {
|
||||||
this.logger.verbose('Jid created is group: ' + `${number}@g.us`);
|
this.logger.verbose('Jid created is group: ' + `${number}@g.us`);
|
||||||
number = number.replace(/[^\d-]/g, '');
|
number = number.replace(/[^\d-]/g, '');
|
||||||
@ -2782,13 +2780,13 @@ export class WAStartupService {
|
|||||||
this.logger.verbose('Updating group description: ' + create.description);
|
this.logger.verbose('Updating group description: ' + create.description);
|
||||||
await this.client.groupUpdateDescription(id, create.description);
|
await this.client.groupUpdateDescription(id, create.description);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (create?.promoteParticipants) {
|
if (create?.promoteParticipants) {
|
||||||
this.logger.verbose('Prometing group participants: ' + create.description);
|
this.logger.verbose('Prometing group participants: ' + create.description);
|
||||||
await this.updateGParticipant({
|
await this.updateGParticipant({
|
||||||
groupJid: id,
|
groupJid: id,
|
||||||
action: "promote",
|
action: 'promote',
|
||||||
participants: participants
|
participants: participants,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user