Get a message's edit history
Fetch the message edit history of a previously edited message.
Note that edit history may be disabled in some organizations; see the
Zulip Help Center documentation on editing messages.
# Pass the path to your zuliprc file here.
client = zulip.Client(config_file="~/zuliprc")
# Get the edit history for message with ID "message_id"
result = client.get_message_history(message_id)
curl -sSX GET -G https://dash.zulipchat.com/api/v1/messages/42/history \
The ID of the message you want to fetch the history of.
message_history: a chronologically sorted array of
containing the modified state of the message before and after the edit:
topic: the topic for the message.
content: the body of the message.
rendered_content: the already rendered, HTML version of
prev_content: the body of the message before being edited.
prev_rendered_content: the already rendered, HTML version of
user_id: the ID of the user that made the edit.
content_html_diff: an HTML diff between this version of the message
and the previous one.
timestamp: the UNIX timestamp for this editi.
Please note that the original message's snapshot only contains the fields
snapshot will be the only one present if the message has never been edited.
Also note that if a message's content was edited (but not the topic)
or the topic was edited (but not the content), the snapshot object
will only contain data for the modified fields (e.g. if only the topic
content_html_diff will not appear).
A typical successful JSON response may look like:
"topic": "party at my houz",
"content_html_diff": "<div><p><span class=\"highlight_text_inserted\">Howdy!</span></p> <p><span class=\"highlight_text_deleted\">Hello!</span></p></div>",
"prev_topic": "party at my houz",
"topic": "party at my house",
An example JSON response for when the specified message does not exist:
"msg": "Invalid message(s)",