mirror of
https://github.com/kotatogram/kotatogram-desktop
synced 2025-09-02 15:45:12 +00:00
Support joining to voice chats as a channel.
This commit is contained in:
@@ -237,6 +237,14 @@ void ChatData::clearGroupCall() {
|
||||
| MTPDchat::Flag::f_call_not_empty);
|
||||
}
|
||||
|
||||
void ChatData::setGroupCallDefaultJoinAs(PeerId peerId) {
|
||||
_callDefaultJoinAs = peerId;
|
||||
}
|
||||
|
||||
PeerId ChatData::groupCallDefaultJoinAs() const {
|
||||
return _callDefaultJoinAs;
|
||||
}
|
||||
|
||||
namespace Data {
|
||||
|
||||
void ApplyChatUpdate(
|
||||
@@ -376,6 +384,11 @@ void ApplyChatUpdate(not_null<ChatData*> chat, const MTPDchatFull &update) {
|
||||
} else {
|
||||
chat->clearGroupCall();
|
||||
}
|
||||
if (const auto as = update.vgroupcall_default_join_as()) {
|
||||
chat->setGroupCallDefaultJoinAs(peerFromMTP(*as));
|
||||
} else {
|
||||
chat->setGroupCallDefaultJoinAs(0);
|
||||
}
|
||||
|
||||
chat->setMessagesTTL(update.vttl_period().value_or_empty());
|
||||
if (const auto info = update.vbot_info()) {
|
||||
|
Reference in New Issue
Block a user