-
-
Notifications
You must be signed in to change notification settings - Fork 7.5k
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
api: Return anchor in get_messages when use_first_unread_anchor=True #8373
Conversation
Hello @zulip/server-api members, this pull request was labeled with the area: api label, so you may want to check it out! |
zerver/tests/test_narrow.py
Outdated
self.login(self.example_email("hamlet")) | ||
result = self.get_and_check_messages(dict(use_first_unread_anchor='true')) | ||
self.assertIn("anchor", result) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd probably just add the assert to an existing test for use_first_unread_anchor.
zerver/lib/test_classes.py
Outdated
"use_first_unread_anchor": ujson.dumps(use_first_unread_anchor)} | ||
result = self.client_get("/json/messages", dict(post_params)) | ||
data = result.json() | ||
return data |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's not duplicate the code from get_messages
; we should just have get_messages
be a wrapper for this that just returns the messages
part.
Generally looks good @shubham-padia! I posted a few comments. |
1dc167a
to
bcc71b8
Compare
@timabbott I've made the changes |
@timabbott Please review |
Looks great, merged as a4b6862 after expanding the commit message to better explain the change. |
fixes #6244
@timabbott Please review