Respected global notify sound for Saved Messages.

Fixed #25315.
This commit is contained in:
23rd 2022-11-10 11:55:17 +03:00 committed by John Preston
parent a02c01cce7
commit 2b7b278b52

View file

@ -499,7 +499,9 @@ bool NotifySettings::silentPosts(not_null<const PeerData*> peer) const {
}
NotifySound NotifySettings::sound(not_null<const PeerData*> peer) const {
if (const auto sound = peer->notify().sound()) {
// Explicitly ignore a notify sound for Saved Messages
// to follow the global notify sound.
if (const auto sound = peer->notify().sound(); !peer->isSelf() && sound) {
return *sound;
} else if (const auto sound = defaultSettings(peer).sound()) {
return *sound;