move to create instead of fromObject

This commit is contained in:
Rajeh Taher
2025-09-07 14:29:45 +03:00
parent 410c26fb82
commit 538d3e4da7
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -247,7 +247,7 @@ const startSock = async() => {
// up to you
// only if store is present
return proto.Message.fromObject({ conversation: 'test' })
return proto.Message.create({ conversation: 'test' })
}
}
+1 -1
View File
@@ -1157,7 +1157,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
ev.buffer()
const willSyncHistory = shouldSyncHistoryMessage(
proto.Message.HistorySyncNotification.fromObject({
proto.Message.HistorySyncNotification.create({
syncType: proto.HistorySync.HistorySyncType.RECENT
})
)
@@ -26,7 +26,7 @@ describe('Connection Deadlock Test', () => {
// 2. Now, emit a regular message. Because the previous step should have
// flushed the buffer, this message should be processed immediately.
const regularMessage = proto.WebMessageInfo.fromObject({
const regularMessage = proto.WebMessageInfo.create({
key: { remoteJid: '1234567890@s.whatsapp.net', fromMe: false, id: 'REGULAR_MSG_1' },
messageTimestamp: Date.now() / 1000,
message: { conversation: 'Hello, world!' }