Various improvements

This commit is contained in:
Ali
2022-06-03 19:47:16 +04:00
parent 1843d3c824
commit 191c1b31ef
28 changed files with 322 additions and 212 deletions

View File

@@ -71,6 +71,12 @@ 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(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)