fix: Add protocolMessageKey and fix revoked messages to preserve original before.id (#3715)

* Add protocolMessageKey and fix revoke

* Add protocolMessageKey and fix revoke

* docs: add explanation
This commit is contained in:
Fernando Mondo 2025-08-28 11:39:22 -03:00 • committed by GitHub
commit 912b78d299
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 16 additions and 0 deletions

View file

@ -468,6 +468,9 @@ class Client extends EventEmitter {
let revoked_msg;
if (last_message && msg.id.id === last_message.id.id) {
revoked_msg = new Message(this, last_message);
if (message.protocolMessageKey)
revoked_msg.id = { ...message.protocolMessageKey };
}
/**