mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 23:13:25 +00:00
api docs: Document the GET /messages/<message_id>/history endpoint.
This commit is contained in:
committed by
Tim Abbott
parent
5c6f381f32
commit
78f85ef960
@@ -505,6 +505,17 @@ def test_delete_message_edit_permission_error(client, nonadmin_client):
|
||||
validate_against_openapi_schema(result, '/messages/{message_id}', 'delete',
|
||||
'400_not_admin')
|
||||
|
||||
def get_message_history(client, message_id):
|
||||
# type: (Client, int) -> None
|
||||
|
||||
# {code_example|start}
|
||||
# Get the edit history for message with ID "message_id"
|
||||
result = client.get_message_history(message_id)
|
||||
# {code_example|end}
|
||||
|
||||
validate_against_openapi_schema(result, '/messages/{message_id}/history',
|
||||
'get', '200')
|
||||
|
||||
def register_queue(client):
|
||||
# type: (Client) -> str
|
||||
|
||||
@@ -622,6 +633,7 @@ TEST_FUNCTIONS = {
|
||||
'/messages/{message_id}:get': get_raw_message,
|
||||
'/messages/{message_id}:patch': update_message,
|
||||
'/messages/{message_id}:delete': delete_message,
|
||||
'/messages/{message_id}/history:get': get_message_history,
|
||||
'/get_stream_id:get': get_stream_id,
|
||||
'get-subscribed-streams': list_subscriptions,
|
||||
'/streams:get': get_streams,
|
||||
@@ -695,6 +707,7 @@ def test_messages(client, nonadmin_client):
|
||||
update_message(client, message_id)
|
||||
get_raw_message(client, message_id)
|
||||
get_messages(client)
|
||||
get_message_history(client, message_id)
|
||||
delete_message(client, message_id)
|
||||
|
||||
test_nonexistent_stream_error(client)
|
||||
|
||||
Reference in New Issue
Block a user