gotd: remove extra wrapping in check participant error

This commit is contained in:
Tulir Asokan
2025-12-12 17:26:41 +02:00
parent 4873ed77ff
commit 1a2fd67ee9

View File

@@ -155,14 +155,14 @@ func (m *Manager) Run(ctx context.Context, api API, userID int64, opt AuthOption
} else if !found {
return nil
} else if isMember, err := m.checkParticipant(ctx, api, userID, channelID, hash); err != nil {
return fmt.Errorf("failed to check if user is participant of channel %d: %w", channelID, err)
return fmt.Errorf("failed to check if user is participant: %w", err)
} else if !isMember {
return nil
}
channels[channelID] = PtsAccessHashTuple{Pts: pts, AccessHash: hash}
return nil
}); err != nil {
return errors.Wrap(err, "iterate channels")
return err
}
diffLim := diffLimitUser