fix error when processing poll messages without messageSecret in channels (#3617)

Co-authored-by: Shir Serlui <70711723+shirser121@users.noreply.github.com>
This commit is contained in:
Ajetunmobi Isaac 2025-06-30 07:40:14 +01:00 • committed by GitHub
commit eaa8445ec0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -285,7 +285,7 @@ class Message extends Base {
this.allowMultipleAnswers = Boolean(!data.pollSelectableOptionsCount); this.allowMultipleAnswers = Boolean(!data.pollSelectableOptionsCount);
this.pollInvalidated = data.pollInvalidated; this.pollInvalidated = data.pollInvalidated;
this.isSentCagPollCreation = data.isSentCagPollCreation; this.isSentCagPollCreation = data.isSentCagPollCreation;
this.messageSecret = Object.keys(data.messageSecret).map((key) => data.messageSecret[key]); this.messageSecret = data.messageSecret ? Object.keys(data.messageSecret).map((key) => data.messageSecret[key]) : [];
} }
return super._patch(data); return super._patch(data);