Skip to content

Commit c2f0806

Browse files
committed
Fix compatibility with Baileys rx-6 2
1 parent 199de10 commit c2f0806

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/whatsapp/services/whatsapp.service.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,7 @@ export class WAStartupService {
906906
keyParticipant:
907907
received?.participant || this.normalizeParticipant(received.key),
908908
messageType,
909-
content: received.message[messageType] as PrismType.Prisma.JsonValue,
909+
content: JSON.parse(JSON.stringify(received.message[messageType])) as PrismType.Prisma.JsonValue,
910910
messageTimestamp: timestamp,
911911
instanceId: this.instance.id,
912912
device: (() => {
@@ -1393,7 +1393,7 @@ export class WAStartupService {
13931393
keyParticipant: m?.participant,
13941394
pushName: m?.pushName,
13951395
messageType: getContentType(m.message),
1396-
content: m.message[getContentType(m.message)] as PrismType.Prisma.JsonValue,
1396+
content: JSON.parse(JSON.stringify(m.message[getContentType(m.message)])) as PrismType.Prisma.JsonValue,
13971397
messageTimestamp: timestamp,
13981398
instanceId: this.instance.id,
13991399
device: 'web',

0 commit comments

Comments
 (0)