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:
@@ -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) {
|
||||
|
Reference in New Issue
Block a user