mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-18 19:32:21 -06:00
fix: crypto.randumUUID is not a function on Manager
This commit is contained in:
@@ -3423,38 +3423,36 @@ export class BaileysStartupService extends ChannelStartupService {
|
||||
}
|
||||
|
||||
public async fetchAllGroups(getParticipants: GetParticipant) {
|
||||
try {
|
||||
const fetch = Object.values(await this?.client?.groupFetchAllParticipating());
|
||||
let groups = [];
|
||||
for (const group of fetch) {
|
||||
const picture = await this.profilePicture(group.id);
|
||||
const fetch = Object.values(await this?.client?.groupFetchAllParticipating());
|
||||
|
||||
const result = {
|
||||
id: group.id,
|
||||
subject: group.subject,
|
||||
subjectOwner: group.subjectOwner,
|
||||
subjectTime: group.subjectTime,
|
||||
pictureUrl: picture.profilePictureUrl,
|
||||
size: group.participants.length,
|
||||
creation: group.creation,
|
||||
owner: group.owner,
|
||||
desc: group.desc,
|
||||
descId: group.descId,
|
||||
restrict: group.restrict,
|
||||
announce: group.announce,
|
||||
};
|
||||
let groups = [];
|
||||
for (const group of fetch) {
|
||||
const picture = null;
|
||||
// const picture = await this.profilePicture(group.id);
|
||||
|
||||
if (getParticipants.getParticipants == 'true') {
|
||||
result['participants'] = group.participants;
|
||||
}
|
||||
const result = {
|
||||
id: group.id,
|
||||
subject: group.subject,
|
||||
subjectOwner: group.subjectOwner,
|
||||
subjectTime: group.subjectTime,
|
||||
pictureUrl: picture?.profilePictureUrl,
|
||||
size: group.participants.length,
|
||||
creation: group.creation,
|
||||
owner: group.owner,
|
||||
desc: group.desc,
|
||||
descId: group.descId,
|
||||
restrict: group.restrict,
|
||||
announce: group.announce,
|
||||
};
|
||||
|
||||
groups = [...groups, result];
|
||||
if (getParticipants.getParticipants == 'true') {
|
||||
result['participants'] = group.participants;
|
||||
}
|
||||
|
||||
return groups;
|
||||
} catch (error) {
|
||||
throw new NotFoundException('Error fetching group', error.toString());
|
||||
groups = [...groups, result];
|
||||
}
|
||||
|
||||
return groups;
|
||||
}
|
||||
|
||||
public async inviteCode(id: GroupJid) {
|
||||
|
||||
Reference in New Issue
Block a user