Commit 4a7f30f
fix: use correct Prisma JSON path filter in getLastMessage (fixes #2495)
The `getLastMessage` function was using an invalid Prisma where-clause
syntax `{ key: { remoteJid: number } }` for a JSON/JSONB field. Prisma
requires `{ key: { path: ['remoteJid'], equals: value } }` to filter on
a JSON field path. This caused a PrismaClientValidationError whenever
`archiveChat` or `markChatUnread` called `getLastMessage` with a chat
number instead of providing lastMessage directly.
Co-Authored-By: Octopus <liyuan851277048@icloud.com>1 parent cd800f2 commit 4a7f30f
1 file changed
Lines changed: 1 addition & 1 deletion
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3689 | 3689 | | |
3690 | 3690 | | |
3691 | 3691 | | |
3692 | | - | |
| 3692 | + | |
3693 | 3693 | | |
3694 | 3694 | | |
3695 | 3695 | | |
| |||
0 commit comments