fix: serialize message properly
This commit is contained in:
Vendored
+2
-2
@@ -2,7 +2,7 @@
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name WhatsApp Web Bridge
|
// @name WhatsApp Web Bridge
|
||||||
// @namespace https://rul.sh/
|
// @namespace https://rul.sh/
|
||||||
// @version 0.0.3
|
// @version 0.0.4
|
||||||
// @description WhatsApp Web WebSocket bridge
|
// @description WhatsApp Web WebSocket bridge
|
||||||
// @match https://web.whatsapp.com/*
|
// @match https://web.whatsapp.com/*
|
||||||
// @updateURL https://git.rul.sh/khairul169/whatsapp-bridge/raw/branch/main/dist/whatsapp-bridge.user.js
|
// @updateURL https://git.rul.sh/khairul169/whatsapp-bridge/raw/branch/main/dist/whatsapp-bridge.user.js
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
isReadOnly: chat.isReadOnly,
|
isReadOnly: chat.isReadOnly,
|
||||||
archived: chat.archived,
|
archived: chat.archived,
|
||||||
unreadCount: chat.unreadCount,
|
unreadCount: chat.unreadCount,
|
||||||
previewMessage: rawPreviewMessage ? serialize(rawPreviewMessage) : null,
|
previewMessage: rawPreviewMessage ? serializeMessage(rawPreviewMessage) : null,
|
||||||
timestamp: chat.t,
|
timestamp: chat.t,
|
||||||
lastMessage: chat.lastMessage ? serialize(chat.lastMessage) : null
|
lastMessage: chat.lastMessage ? serialize(chat.lastMessage) : null
|
||||||
};
|
};
|
||||||
|
|||||||
Vendored
+2
-2
File diff suppressed because one or more lines are too long
+1
-1
@@ -14,7 +14,7 @@ await esbuild.build({
|
|||||||
// ==UserScript==
|
// ==UserScript==
|
||||||
// @name WhatsApp Web Bridge
|
// @name WhatsApp Web Bridge
|
||||||
// @namespace https://rul.sh/
|
// @namespace https://rul.sh/
|
||||||
// @version 0.0.3
|
// @version 0.0.4
|
||||||
// @description WhatsApp Web WebSocket bridge
|
// @description WhatsApp Web WebSocket bridge
|
||||||
// @match https://web.whatsapp.com/*
|
// @match https://web.whatsapp.com/*
|
||||||
// @updateURL https://git.rul.sh/khairul169/whatsapp-bridge/raw/branch/main/dist/whatsapp-bridge.user.js
|
// @updateURL https://git.rul.sh/khairul169/whatsapp-bridge/raw/branch/main/dist/whatsapp-bridge.user.js
|
||||||
|
|||||||
@@ -150,7 +150,9 @@ export function serializeChat(chat: any): ChatDTO {
|
|||||||
isReadOnly: chat.isReadOnly,
|
isReadOnly: chat.isReadOnly,
|
||||||
archived: chat.archived,
|
archived: chat.archived,
|
||||||
unreadCount: chat.unreadCount,
|
unreadCount: chat.unreadCount,
|
||||||
previewMessage: rawPreviewMessage ? serialize(rawPreviewMessage) : null,
|
previewMessage: rawPreviewMessage
|
||||||
|
? serializeMessage(rawPreviewMessage)
|
||||||
|
: null,
|
||||||
|
|
||||||
timestamp: chat.t,
|
timestamp: chat.t,
|
||||||
lastMessage: chat.lastMessage ? serialize(chat.lastMessage) : null,
|
lastMessage: chat.lastMessage ? serialize(chat.lastMessage) : null,
|
||||||
|
|||||||
Reference in New Issue
Block a user