Skip to content

Commit

Permalink
fix(api): rework fetching channel
Browse files Browse the repository at this point in the history
  • Loading branch information
ernado committed Apr 18, 2024
1 parent 90cdcf7 commit 1a822cd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/api/badge.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ func (s Server) GetTelegramBadge(ctx context.Context, params oas.GetTelegramBadg
if err != nil {
return nil, errors.Wrap(err, "resolve domain")
}
fullChat, err := s.tg.API().MessagesGetFullChat(ctx, peer.(*tg.InputPeerChannel).ChannelID)
var inputChannel tg.InputChannel
inputChannel.FillFrom(peer.(*tg.InputPeerChannel))
fullChat, err := s.tg.API().ChannelsGetFullChannel(ctx, &inputChannel)
if err != nil {
return nil, errors.Wrap(err, "get chat")
}
Expand Down

0 comments on commit 1a822cd

Please sign in to comment.