Fix checking if sending to a group (#3592)

* Fix checking if sending to a group

* chore: mark channels as done feature

* refactor: add safety check for chat.id.isGroup

---------

Co-authored-by: alechkos <93551621+alechkos@users.noreply.github.com>
This commit is contained in:
Shir Serlui 2025-08-09 00:46:18 +03:00 • committed by GitHub
commit ecb50450b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -247,7 +247,7 @@ exports.LoadUtils = () => {
let from = chat.id.isLid() ? lidUser : meUser; let from = chat.id.isLid() ? lidUser : meUser;
let participant; let participant;
if (chat.isGroup) { if (typeof chat.id?.isGroup === 'function' && chat.id.isGroup()) {
from = chat.groupMetadata && chat.groupMetadata.isLidAddressingMode ? lidUser : meUser; from = chat.groupMetadata && chat.groupMetadata.isLidAddressingMode ? lidUser : meUser;
participant = window.Store.WidFactory.toUserWid(from); participant = window.Store.WidFactory.toUserWid(from);
} }