Skip to content

Commit

Permalink
fix: no cache check for InputPeerChannel
Browse files Browse the repository at this point in the history
InputPeerChannel already has ChannelID and AccessHash in it
  • Loading branch information
aiexz committed Jan 24, 2024
1 parent 48b9e55 commit f07c381
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions telegram/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,7 @@ PeerSwitch:
case *InputPeerChat:
return Peer, nil
case *InputPeerChannel:
peerEntity, err := c.GetPeerChannel(Peer.ChannelID)
if err != nil {
return nil, err
}
return &InputPeerChannel{ChannelID: peerEntity.ChannelID, AccessHash: peerEntity.AccessHash}, nil
return Peer, nil
case *InputPeerUser:
peerEntity, err := c.GetPeerUser(Peer.UserID)
if err != nil {
Expand Down

0 comments on commit f07c381

Please sign in to comment.