Skip to content

Commit

Permalink
Merge pull request #608 from L11R/main
Browse files Browse the repository at this point in the history
Pass function scope context
  • Loading branch information
tdakkota committed Dec 7, 2021
2 parents 1390e5e + ec500d2 commit 4a04b2e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions telegram/updates/state_apply.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ func (s *state) applyCombined(ctx context.Context, comb *tg.UpdatesCombined) (pt
}

if len(others) > 0 {
if err := s.handler.Handle(s.ctx, &tg.Updates{
if err := s.handler.Handle(ctx, &tg.Updates{
Updates: others,
Users: ents.Users,
Chats: ents.Chats,
Expand Down Expand Up @@ -136,7 +136,7 @@ func (s *state) applyPts(ctx context.Context, state int, updates []update) error
ents.Merge(update.Ents)
}

if err := s.handler.Handle(s.ctx, &tg.Updates{
if err := s.handler.Handle(ctx, &tg.Updates{
Updates: converted,
Users: ents.Users,
Chats: ents.Chats,
Expand Down

0 comments on commit 4a04b2e

Please sign in to comment.