Skip to content

Conversation

ghost
Copy link

@ghost ghost commented Oct 26, 2021

Closes #16

updates.go Outdated

func (u *Updater) GetLastEvents(pollTime int) ([]*Event, error) {
events, err := u.client.GetEvents(u.lastEventID, pollTime)
func (u *Updater) GetLastEvents(ctx context.Context, pollTime int) ([]*Event, error) {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This breaks backwards compatibility for GetLastEvents — maybe GetLastEventsWithContext should be added instead?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for reviewing!

Wraps GetEvents and GetLastEvents with non-context signature.

@ghost ghost changed the title Closes #16 Add context to client request Oct 29, 2021
@DmitryDorofeev DmitryDorofeev merged commit 949689d into mail-ru-im:master Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Context not passed to GetEvents from updater

2 participants