fix: crypto.randumUUID is not a function on Manager

This commit is contained in:
Davidson Gomes 2024-08-14 16:01:14 -03:00
parent b3991cf6bb
commit 360f8066a7
3 changed files with 105 additions and 107 deletions

File diff suppressed because one or more lines are too long

View File

@ -5,7 +5,7 @@
<link rel="icon" type="image/png" href="/assets/images/evolution-logo.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Evolution Manager</title>
<script type="module" crossorigin src="/assets/index-9IhqdAdi.js"></script>
<script type="module" crossorigin src="/assets/index-BXAjm9gh.js"></script>
<link rel="stylesheet" crossorigin href="/assets/index-DZ0gaAHg.css">
</head>
<body>

View File

@ -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) {