mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-08-29 02:36:11 -06:00
Merge 4dafa46b7b
into 33a922995b
This commit is contained in:
commit
d8b74afaf6
@ -4619,6 +4619,7 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
id?: string;
|
id?: string;
|
||||||
fromMe?: boolean;
|
fromMe?: boolean;
|
||||||
remoteJid?: string;
|
remoteJid?: string;
|
||||||
|
senderPn?: string;
|
||||||
participants?: string;
|
participants?: string;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -4642,8 +4643,13 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
AND: [
|
AND: [
|
||||||
keyFilters?.id ? { key: { path: ['id'], equals: keyFilters?.id } } : {},
|
keyFilters?.id ? { key: { path: ['id'], equals: keyFilters?.id } } : {},
|
||||||
keyFilters?.fromMe ? { key: { path: ['fromMe'], equals: keyFilters?.fromMe } } : {},
|
keyFilters?.fromMe ? { key: { path: ['fromMe'], equals: keyFilters?.fromMe } } : {},
|
||||||
keyFilters?.remoteJid ? { key: { path: ['remoteJid'], equals: keyFilters?.remoteJid } } : {},
|
|
||||||
keyFilters?.participants ? { key: { path: ['participants'], equals: keyFilters?.participants } } : {},
|
keyFilters?.participants ? { key: { path: ['participants'], equals: keyFilters?.participants } } : {},
|
||||||
|
{
|
||||||
|
OR: [
|
||||||
|
keyFilters?.remoteJid ? { key: { path: ['remoteJid'], equals: keyFilters?.remoteJid } } : {},
|
||||||
|
keyFilters?.senderPn ? { key: { path: ['senderPn'], equals: keyFilters?.senderPn } } : {},
|
||||||
|
]
|
||||||
|
}
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@ -4666,9 +4672,15 @@ export class BaileysStartupService extends ChannelStartupService {
|
|||||||
AND: [
|
AND: [
|
||||||
keyFilters?.id ? { key: { path: ['id'], equals: keyFilters?.id } } : {},
|
keyFilters?.id ? { key: { path: ['id'], equals: keyFilters?.id } } : {},
|
||||||
keyFilters?.fromMe ? { key: { path: ['fromMe'], equals: keyFilters?.fromMe } } : {},
|
keyFilters?.fromMe ? { key: { path: ['fromMe'], equals: keyFilters?.fromMe } } : {},
|
||||||
keyFilters?.remoteJid ? { key: { path: ['remoteJid'], equals: keyFilters?.remoteJid } } : {},
|
|
||||||
keyFilters?.participants ? { key: { path: ['participants'], equals: keyFilters?.participants } } : {},
|
keyFilters?.participants ? { key: { path: ['participants'], equals: keyFilters?.participants } } : {},
|
||||||
|
{
|
||||||
|
OR: [
|
||||||
|
keyFilters?.remoteJid ? { key: { path: ['remoteJid'], equals: keyFilters?.remoteJid } } : {},
|
||||||
|
keyFilters?.senderPn ? { key: { path: ['senderPn'], equals: keyFilters?.senderPn } } : {},
|
||||||
|
]
|
||||||
|
}
|
||||||
],
|
],
|
||||||
|
|
||||||
},
|
},
|
||||||
orderBy: { messageTimestamp: 'desc' },
|
orderBy: { messageTimestamp: 'desc' },
|
||||||
skip: query.offset * (query?.page === 1 ? 0 : (query?.page as number) - 1),
|
skip: query.offset * (query?.page === 1 ? 0 : (query?.page as number) - 1),
|
||||||
|
Loading…
Reference in New Issue
Block a user