Skip to content

Commit eb456f6

Browse files
author
Jesus
committed
Fix unreadMessages for fetchChats query
1 parent f5f778e commit eb456f6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/api/services/channel.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ export class ChannelStartupService {
624624
"Chat"."updatedAt",
625625
"Contact"."pushName",
626626
"Contact"."profilePicUrl",
627-
"Contact"."unreadMessages"
627+
"Chat"."unreadMessages"
628628
FROM "Chat"
629629
INNER JOIN "Message" ON "Chat"."remoteJid" = "Message"."key"->>'remoteJid'
630630
LEFT JOIN "Contact" ON "Chat"."remoteJid" = "Contact"."remoteJid"
@@ -639,7 +639,7 @@ export class ChannelStartupService {
639639
"Chat"."updatedAt",
640640
"Contact"."pushName",
641641
"Contact"."profilePicUrl",
642-
"Contact"."unreadMessages"
642+
"Chat"."unreadMessages"
643643
ORDER BY "Chat"."updatedAt" DESC;
644644
`;
645645

0 commit comments

Comments
 (0)