fix: Promote All Participants in Create Group

Promote All Participants in Create Group
This commit is contained in:
Davidson Gomes
2023-07-24 20:07:05 -03:00
committed by GitHub
3 changed files with 13 additions and 2 deletions

View File

@@ -2774,11 +2774,20 @@ export class WAStartupService {
this.logger.verbose('Updating group description: ' + create.description);
await this.client.groupUpdateDescription(id, create.description);
}
if (create?.promoteParticipants) {
this.logger.verbose('Prometing group participants: ' + create.description);
await this.updateGParticipant({
groupJid: id,
action: "promote",
participants: participants
});
}
const group = await this.client.groupMetadata(id);
this.logger.verbose('Getting group metadata');
return { groupMetadata: group };
return group;
} catch (error) {
this.logger.error(error);
throw new InternalServerErrorException('Error creating group', error.toString());