fix(tctoken): align lifecycle with WABA Android behavior (#256)
- Error 463 (MissingTcToken): add getPrivacyTokens() re-fetch before retry - Error 479 (SmaxInvalid): add getPrivacyTokens() re-fetch (fire-and-forget) - Add realIssueTimestamp field matching wa_trusted_contacts_send schema - Session refresh reissue: store IQ result + persist senderTimestamp/realIssueTimestamp
This commit is contained in:
@@ -159,7 +159,10 @@ export async function storeTcTokensFromIqResult({
|
||||
[storageJid]: {
|
||||
...existingEntry,
|
||||
token: Buffer.from(tokenNode.content),
|
||||
timestamp: tokenNode.attrs.t
|
||||
timestamp: tokenNode.attrs.t,
|
||||
// WABA Android: resets real_issue_timestamp to null when storing a new token
|
||||
// (UPDATE wa_trusted_contacts_send SET real_issue_timestamp=null)
|
||||
realIssueTimestamp: null
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user