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

api: Implement GET /messages/{message_id}/read_receipts endpoint #821

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions zulip/zulip/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -1591,6 +1591,18 @@ def render_message(self, request: Optional[Dict[str, Any]] = None) -> Dict[str,
request=request,
)

def get_message_read_receipts(self, message_id: int) -> Dict[str, Any]:
"""
Example usage:
>>> client.get_message_read_receipts(42)
{'result': 'success', 'msg': '', 'user_ids': [42]}
"""
return self.call_endpoint(
url=f"messages/{message_id}/read_receipts",
method="GET",
)
Copy link
Member

Choose a reason for hiding this comment

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

Our usual convention is to use the same names as the URL suffices on https://zulip.com/api/get-read-receipts.

Copy link
Author

Choose a reason for hiding this comment

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

so should I change the function name to get_read_receipts, not sure if that is what you meant

Copy link
Member

Choose a reason for hiding this comment

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

Yes


def create_user(self, request: Optional[Dict[str, Any]] = None) -> Dict[str, Any]:
"""
See examples/create-user for example usage.
Expand Down
Loading