move to create instead of fromObject
This commit is contained in:
+1
-1
@@ -247,7 +247,7 @@ const startSock = async() => {
|
|||||||
// up to you
|
// up to you
|
||||||
|
|
||||||
// only if store is present
|
// only if store is present
|
||||||
return proto.Message.fromObject({ conversation: 'test' })
|
return proto.Message.create({ conversation: 'test' })
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1157,7 +1157,7 @@ export const makeChatsSocket = (config: SocketConfig) => {
|
|||||||
ev.buffer()
|
ev.buffer()
|
||||||
|
|
||||||
const willSyncHistory = shouldSyncHistoryMessage(
|
const willSyncHistory = shouldSyncHistoryMessage(
|
||||||
proto.Message.HistorySyncNotification.fromObject({
|
proto.Message.HistorySyncNotification.create({
|
||||||
syncType: proto.HistorySync.HistorySyncType.RECENT
|
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
|
// 2. Now, emit a regular message. Because the previous step should have
|
||||||
// flushed the buffer, this message should be processed immediately.
|
// 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' },
|
key: { remoteJid: '1234567890@s.whatsapp.net', fromMe: false, id: 'REGULAR_MSG_1' },
|
||||||
messageTimestamp: Date.now() / 1000,
|
messageTimestamp: Date.now() / 1000,
|
||||||
message: { conversation: 'Hello, world!' }
|
message: { conversation: 'Hello, world!' }
|
||||||
|
|||||||
Reference in New Issue
Block a user