mirror of
https://github.com/telegramdesktop/tdesktop
synced 2025-08-30 22:16:14 +00:00
Support joining to voice chats as a channel.
This commit is contained in:
@@ -713,6 +713,14 @@ void ChannelData::clearGroupCall() {
|
||||
| MTPDchannel::Flag::f_call_not_empty);
|
||||
}
|
||||
|
||||
void ChannelData::setGroupCallDefaultJoinAs(PeerId peerId) {
|
||||
_callDefaultJoinAs = peerId;
|
||||
}
|
||||
|
||||
PeerId ChannelData::groupCallDefaultJoinAs() const {
|
||||
return _callDefaultJoinAs;
|
||||
}
|
||||
|
||||
namespace Data {
|
||||
|
||||
void ApplyMigration(
|
||||
@@ -759,6 +767,11 @@ void ApplyChannelUpdate(
|
||||
} else {
|
||||
channel->clearGroupCall();
|
||||
}
|
||||
if (const auto as = update.vgroupcall_default_join_as()) {
|
||||
channel->setGroupCallDefaultJoinAs(peerFromMTP(*as));
|
||||
} else {
|
||||
channel->setGroupCallDefaultJoinAs(0);
|
||||
}
|
||||
|
||||
channel->setMessagesTTL(update.vttl_period().value_or_empty());
|
||||
channel->setFullFlags(update.vflags().v);
|
||||
|
Reference in New Issue
Block a user