Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add until attach functionality to Presence & Channel #102

Merged
merged 3 commits into from
Mar 2, 2016

Conversation

gokhanbarisaker
Copy link
Contributor

Resolves: #36



private static final String KEY_UNTIL_ATTACH = "untilAttach";
private static final String KEY_FROM_SERIAL = "from_serial";
Copy link
Member

Choose a reason for hiding this comment

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

We should use fromSerial.

Copy link
Member

Choose a reason for hiding this comment

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

FYI @gokhanbarisaker we changed all query string params from under_score case to camelCase a little while ago but did not roll it out everywhere, hence this comment...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

BodyHandler<Message> bodyHandler = MessageSerializer.getMessageResponseHandler(options);
return new PaginatedQuery<Message>(ably.http, basePath + "/history", HttpUtils.defaultAcceptHeaders(ably.options.useBinaryProtocol), params, bodyHandler).get();
return new PaginatedQuery<>(ably.http, basePath + "/history", HttpUtils.defaultAcceptHeaders(ably.options.useBinaryProtocol), params, bodyHandler).get();
Copy link
Member

Choose a reason for hiding this comment

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

This is I am sure my lack of knowledge of Java syntax here, but why did we drop the Message here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is automatically using the generic passed down with BodyHandler. Therefore, we don't need to explicitly specify the generic again.

@paddybyers
Copy link
Member

This looks ok to me now. @mattheworiordan ?

@mattheworiordan
Copy link
Member

LGTM

mattheworiordan added a commit that referenced this pull request Mar 2, 2016
Add until attach functionality to Presence & Channel
@mattheworiordan mattheworiordan merged commit cd29757 into ably:master Mar 2, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants