mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-12-12 11:29:38 -06:00
fix lint
This commit is contained in:
parent
fb1fa4d91a
commit
bedfb019aa
@ -1618,7 +1618,7 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
|
|
||||||
// Filtra apenas os participantes que estão no evento
|
// Filtra apenas os participantes que estão no evento
|
||||||
const resolvedParticipants = participantsUpdate.participants.map((participantId) => {
|
const resolvedParticipants = participantsUpdate.participants.map((participantId) => {
|
||||||
const participantData = groupParticipants.participants.find(p => p.id === participantId);
|
const participantData = groupParticipants.participants.find((p) => p.id === participantId);
|
||||||
|
|
||||||
let phoneNumber: string;
|
let phoneNumber: string;
|
||||||
if (participantData?.phoneNumber) {
|
if (participantData?.phoneNumber) {
|
||||||
@ -1639,13 +1639,14 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
const enhancedParticipantsUpdate = {
|
const enhancedParticipantsUpdate = {
|
||||||
...participantsUpdate,
|
...participantsUpdate,
|
||||||
participants: participantsUpdate.participants, // Mantém array original de strings
|
participants: participantsUpdate.participants, // Mantém array original de strings
|
||||||
participantsData: resolvedParticipants // Adiciona dados resolvidos em campo separado
|
// Adiciona dados resolvidos em campo separado
|
||||||
|
participantsData: resolvedParticipants,
|
||||||
};
|
};
|
||||||
|
|
||||||
this.sendDataWebhook(Events.GROUP_PARTICIPANTS_UPDATE, enhancedParticipantsUpdate);
|
this.sendDataWebhook(Events.GROUP_PARTICIPANTS_UPDATE, enhancedParticipantsUpdate);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.logger.error(
|
this.logger.error(
|
||||||
`Failed to resolve participant data for GROUP_PARTICIPANTS_UPDATE webhook: ${error.message} | Group: ${participantsUpdate.id} | Participants: ${participantsUpdate.participants.length}`
|
`Failed to resolve participant data for GROUP_PARTICIPANTS_UPDATE webhook: ${error.message} | Group: ${participantsUpdate.id} | Participants: ${participantsUpdate.participants.length}`,
|
||||||
);
|
);
|
||||||
// Fallback - envia sem conversão
|
// Fallback - envia sem conversão
|
||||||
this.sendDataWebhook(Events.GROUP_PARTICIPANTS_UPDATE, participantsUpdate);
|
this.sendDataWebhook(Events.GROUP_PARTICIPANTS_UPDATE, participantsUpdate);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user