edit_history: Add comments detailing when user_id can be null.

This is already in the API documentation, but I think it's worth
having here.
This commit is contained in:
Tim Abbott 2022-03-04 11:53:13 -08:00
parent 58f21fc748
commit 8376acb3b8
1 changed files with 5 additions and 0 deletions

View File

@ -96,6 +96,10 @@ class EditHistoryEvent(TypedDict, total=False):
Database format for edit history events.
"""
# user_id is null for precisely those edit history events
# predating March 2017, when we started tracking the person who
# made edits, which is still years after the introduction of topic
# editing support in Zulip.
user_id: Optional[int]
timestamp: int
prev_stream: int
@ -112,6 +116,7 @@ class FormattedEditHistoryEvent(TypedDict, total=False):
Extended format used in the edit history endpoint.
"""
# See EditHistoryEvent for details on when this can be null.
user_id: Optional[int]
timestamp: int
prev_stream: int