Fix default muted state display

This commit is contained in:
Ilya Laktyushin
2023-01-21 21:36:08 +04:00
parent ac34aac586
commit 3f70f73f1c
4 changed files with 51 additions and 12 deletions

View File

@@ -72,11 +72,6 @@ func _internal_joinChannel(account: Account, peerId: PeerId, hash: String?) -> S
}
}
if let channel = transaction.getPeer(peerId) as? TelegramChannel, case .broadcast = channel.info {
let notificationSettings = transaction.getPeerNotificationSettings(id: peerId) as? TelegramPeerNotificationSettings ?? TelegramPeerNotificationSettings.defaultSettings
transaction.updateCurrentPeerNotificationSettings([peerId: notificationSettings.withUpdatedMuteState(.muted(until: Int32.max))])
}
return RenderedChannelParticipant(participant: updatedParticipant, peer: peer, peers: peers, presences: presences)
}
|> castError(JoinChannelError.self)