2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-31 06:26:18 +00:00

Support [inputN|n]otifyBroadcasts setting.

This commit is contained in:
John Preston
2018-11-06 15:10:20 +04:00
parent 75db59a8bb
commit 36b702702b
7 changed files with 58 additions and 11 deletions

View File

@@ -1898,6 +1898,7 @@ void ApiWrap::requestNotifySettings(const MTPInputNotifyPeer &peer) {
switch (peer.type()) {
case mtpc_inputNotifyUsers: return peerFromUser(0);
case mtpc_inputNotifyChats: return peerFromChat(0);
case mtpc_inputNotifyBroadcasts: return peerFromChannel(0);
case mtpc_inputNotifyPeer: {
const auto &inner = peer.c_inputNotifyPeer().vpeer;
switch (inner.type()) {
@@ -2274,6 +2275,11 @@ void ApiWrap::notifySettingReceived(
case mtpc_inputNotifyChats:
_session->data().applyNotifySetting(MTP_notifyChats(), settings);
break;
case mtpc_inputNotifyBroadcasts:
_session->data().applyNotifySetting(
MTP_notifyBroadcasts(),
settings);
break;
case mtpc_inputNotifyPeer: {
auto &peer = notifyPeer.c_inputNotifyPeer().vpeer;
const auto apply = [&](PeerId peerId) {