mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-23 06:35:51 +00:00
Fix send as peer
This commit is contained in:
@@ -79,6 +79,13 @@ func apiInputPeer(_ peer: Peer) -> Api.InputPeer? {
|
||||
}
|
||||
}
|
||||
|
||||
func apiInputPeerOrSelf(_ peer: Peer, accountPeerId: PeerId) -> Api.InputPeer? {
|
||||
if peer.id == accountPeerId {
|
||||
return .inputPeerSelf
|
||||
}
|
||||
return apiInputPeer(peer)
|
||||
}
|
||||
|
||||
func apiInputChannel(_ peer: Peer) -> Api.InputChannel? {
|
||||
if let channel = peer as? TelegramChannel, let accessHash = channel.accessHash {
|
||||
return Api.InputChannel.inputChannel(channelId: channel.id.id._internalGetInt64Value(), accessHash: accessHash.value)
|
||||
|
||||
Reference in New Issue
Block a user