mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-16 12:12:55 -06:00
Merge pull request #971 from jesus-chacon/bugs/fix_fetch_chats_query
Fix fetch chats query
This commit is contained in:
commit
f5baced024
@ -662,9 +662,8 @@ export class ChannelStartupService {
|
|||||||
GROUP BY
|
GROUP BY
|
||||||
"Chat"."id",
|
"Chat"."id",
|
||||||
"Chat"."remoteJid",
|
"Chat"."remoteJid",
|
||||||
"Contact"."id",
|
"Contact"."id"
|
||||||
"Message"."messageTimestamp"
|
ORDER BY last_message_messageTimestamp DESC NULLS LAST, "Chat"."updatedAt" DESC;
|
||||||
ORDER BY "Message"."messageTimestamp" DESC NULLS LAST, "Chat"."updatedAt" DESC;
|
|
||||||
`;
|
`;
|
||||||
} else {
|
} else {
|
||||||
results = await this.prismaRepository.$queryRaw`
|
results = await this.prismaRepository.$queryRaw`
|
||||||
@ -698,9 +697,8 @@ export class ChannelStartupService {
|
|||||||
GROUP BY
|
GROUP BY
|
||||||
"Chat"."id",
|
"Chat"."id",
|
||||||
"Chat"."remoteJid",
|
"Chat"."remoteJid",
|
||||||
"Contact"."id",
|
"Contact"."id"
|
||||||
"Message"."messageTimestamp"
|
ORDER BY last_message_messageTimestamp DESC NULLS LAST, "Chat"."updatedAt" DESC;
|
||||||
ORDER BY "Message"."messageTimestamp" DESC NULLS LAST, "Chat"."updatedAt" DESC;
|
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user