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" /> <link rel="icon" type="image/png" href="/assets/images/evolution-logo.png" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Evolution Manager</title> <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"> <link rel="stylesheet" crossorigin href="/assets/index-DZ0gaAHg.css">
</head> </head>
<body> <body>

View File

@ -3423,38 +3423,36 @@ export class BaileysStartupService extends ChannelStartupService {
} }
public async fetchAllGroups(getParticipants: GetParticipant) { public async fetchAllGroups(getParticipants: GetParticipant) {
try { const fetch = Object.values(await this?.client?.groupFetchAllParticipating());
const fetch = Object.values(await this?.client?.groupFetchAllParticipating());
let groups = [];
for (const group of fetch) {
const picture = await this.profilePicture(group.id);
const result = { let groups = [];
id: group.id, for (const group of fetch) {
subject: group.subject, const picture = null;
subjectOwner: group.subjectOwner, // const picture = await this.profilePicture(group.id);
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,
};
if (getParticipants.getParticipants == 'true') { const result = {
result['participants'] = group.participants; 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; groups = [...groups, result];
} catch (error) {
throw new NotFoundException('Error fetching group', error.toString());
} }
return groups;
} }
public async inviteCode(id: GroupJid) { public async inviteCode(id: GroupJid) {