Chore: Remove context.TODO (#43458)

* Remove context.TODO() from services

* Fix live test
This commit is contained in:
idafurjes
2021-12-28 10:26:18 +01:00
committed by GitHub
parent 56b3dc5445
commit 56c3875bb9
24 changed files with 81 additions and 77 deletions
@@ -15,7 +15,7 @@ type BuiltinSubscriber struct {
}
type ChannelHandlerGetter interface {
GetChannelHandler(user *models.SignedInUser, channel string) (models.ChannelHandler, live.Channel, error)
GetChannelHandler(ctx context.Context, user *models.SignedInUser, channel string) (models.ChannelHandler, live.Channel, error)
}
const SubscriberTypeBuiltin = "builtin"
@@ -33,7 +33,7 @@ func (s *BuiltinSubscriber) Subscribe(ctx context.Context, vars Vars, data []byt
if !ok {
return models.SubscribeReply{}, backend.SubscribeStreamStatusPermissionDenied, nil
}
handler, _, err := s.channelHandlerGetter.GetChannelHandler(u, vars.Channel)
handler, _, err := s.channelHandlerGetter.GetChannelHandler(ctx, u, vars.Channel)
if err != nil {
return models.SubscribeReply{}, 0, err
}