mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00
Fix empty send as
This commit is contained in:
parent
127fdcbfbf
commit
af4d13febe
@ -298,12 +298,17 @@ extension ChatControllerImpl {
|
||||
allPeers = peers
|
||||
|
||||
var hasAnonymousPeer = false
|
||||
var hasSelfPeer = false
|
||||
for peer in peers {
|
||||
if peer.peer.id == channel.id {
|
||||
hasAnonymousPeer = true
|
||||
break
|
||||
} else if peer.peer.id == strongSelf.context.account.peerId {
|
||||
hasSelfPeer = true
|
||||
}
|
||||
}
|
||||
if !hasSelfPeer {
|
||||
allPeers?.insert(currentAccountPeer, at: 0)
|
||||
}
|
||||
if !hasAnonymousPeer {
|
||||
allPeers?.insert(SendAsPeer(peer: channel, subscribers: 0, isPremiumRequired: false), at: 0)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user