2
0
mirror of https://github.com/telegramdesktop/tdesktop synced 2025-08-30 22:16:14 +00:00

Reset notify settings on unarchive.

This commit is contained in:
John Preston
2020-07-06 14:26:00 +04:00
parent 5c5414b680
commit 152b49c65c
3 changed files with 15 additions and 1 deletions

View File

@@ -3593,6 +3593,19 @@ void Session::updateNotifySettings(
}
}
void Session::resetNotifySettingsToDefault(not_null<PeerData*> peer) {
const auto empty = MTP_peerNotifySettings(
MTP_flags(0),
MTPBool(),
MTPBool(),
MTPint(),
MTPstring());
if (peer->notifyChange(empty)) {
updateNotifySettingsLocal(peer);
_session->api().updateNotifySettingsDelayed(peer);
}
}
bool Session::notifyIsMuted(
not_null<const PeerData*> peer,
crl::time *changesIn) const {