Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Example/example.ts
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,10 @@ const startSock = async() => {

// go to an old chat and send this
if (text == "onDemandHistSync") {
const messageId = await sock.fetchMessageHistory(50, msg.key, msg.messageTimestamp!)
// proto field is `oldestMsgTimestampMs` (ms) but `messageTimestamp` is seconds
const tsRaw = msg.messageTimestamp!
const tsMs = (typeof tsRaw === 'number' ? tsRaw : tsRaw.toNumber()) * 1000
const messageId = await sock.fetchMessageHistory(50, msg.key, tsMs)
Comment thread
zomars marked this conversation as resolved.
logger.debug({ id: messageId }, 'requested on-demand history resync')
}

Expand Down
Loading