diff --git a/submodules/TelegramCore/Sources/State/AccountStateManagementUtils.swift b/submodules/TelegramCore/Sources/State/AccountStateManagementUtils.swift index e62c9497fe..b2b16fb876 100644 --- a/submodules/TelegramCore/Sources/State/AccountStateManagementUtils.swift +++ b/submodules/TelegramCore/Sources/State/AccountStateManagementUtils.swift @@ -3406,19 +3406,21 @@ func replayFinalState( transaction.removeHole(peerId: chatPeerId, threadId: nil, namespace: Namespaces.Message.Cloud, space: space, range: 1 ... id.id) } case let .setChatWallpaper(wallpaper): - transaction.updatePeerCachedData(peerIds: [message.id.peerId], update: { peerId, current in - var current = current - if current == nil { - if peerId.namespace == Namespaces.Peer.CloudUser { - current = CachedUserData() - } - } - if let cachedData = current as? CachedUserData { - return cachedData.withUpdatedWallpaper(wallpaper) - } else { - return current - } - }) + if chatPeerId == accountPeerId { + transaction.updatePeerCachedData(peerIds: [message.id.peerId], update: { peerId, current in + var current = current + if current == nil { + if peerId.namespace == Namespaces.Peer.CloudUser { + current = CachedUserData() + } + } + if let cachedData = current as? CachedUserData { + return cachedData.withUpdatedWallpaper(wallpaper) + } else { + return current + } + }) + } default: break }