ручное парсер
This commit is contained in:
@@ -23,6 +23,14 @@ func (uc *UseCase) FetchViews(ctx context.Context) error {
|
||||
|
||||
err = uc.telegram.UpdatePostsViews(ctx, channel, posts)
|
||||
if err != nil {
|
||||
if isPrivateChannelError(err) {
|
||||
channel.IsAccessible = false
|
||||
err = uc.database.UpdateChannel(ctx, channel)
|
||||
if err != nil {
|
||||
log.Err(err).Msg("initializeChannel.uc.database.UpdateChannel")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user