mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-25 14:47:45 -06:00
Start
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
export class CreateGroupDto {
|
||||
subject: string;
|
||||
description?: string;
|
||||
participants: string[];
|
||||
description?: string;
|
||||
promoteParticipants?: boolean;
|
||||
}
|
||||
|
||||
export class GroupPictureDto {
|
||||
|
||||
@@ -2785,11 +2785,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());
|
||||
|
||||
Reference in New Issue
Block a user