mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-14 01:41:24 -06:00
Fix fetch chats query
This commit is contained in:
parent
f38f3e5ba5
commit
8ab8961e91
@ -662,9 +662,8 @@ export class ChannelStartupService {
|
||||
GROUP BY
|
||||
"Chat"."id",
|
||||
"Chat"."remoteJid",
|
||||
"Contact"."id",
|
||||
"Message"."messageTimestamp"
|
||||
ORDER BY "Message"."messageTimestamp" DESC NULLS LAST, "Chat"."updatedAt" DESC;
|
||||
"Contact"."id"
|
||||
ORDER BY last_message_messageTimestamp DESC NULLS LAST, "Chat"."updatedAt" DESC;
|
||||
`;
|
||||
} else {
|
||||
results = await this.prismaRepository.$queryRaw`
|
||||
@ -698,9 +697,8 @@ export class ChannelStartupService {
|
||||
GROUP BY
|
||||
"Chat"."id",
|
||||
"Chat"."remoteJid",
|
||||
"Contact"."id",
|
||||
"Message"."messageTimestamp"
|
||||
ORDER BY "Message"."messageTimestamp" DESC NULLS LAST, "Chat"."updatedAt" DESC;
|
||||
"Contact"."id"
|
||||
ORDER BY last_message_messageTimestamp DESC NULLS LAST, "Chat"."updatedAt" DESC;
|
||||
`;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user