mirror of
https://github.com/zulip/zulip.git
synced 2025-11-06 15:03:34 +00:00
message_send: Add forged_timestamp to internal_prep_stream_message.
This commit adds the "forged_timestamp" parameter to the "internal_prep_stream_message" method of "actions/message_send". This is a preparatory commit, that can be used for sending messages at a forged time in scripts for generating screenshots of messages.
This commit is contained in:
@@ -1794,6 +1794,8 @@ def _internal_prep_message(
|
|||||||
mention_backend: Optional[MentionBackend] = None,
|
mention_backend: Optional[MentionBackend] = None,
|
||||||
limit_unread_user_ids: Optional[Set[int]] = None,
|
limit_unread_user_ids: Optional[Set[int]] = None,
|
||||||
disable_external_notifications: bool = False,
|
disable_external_notifications: bool = False,
|
||||||
|
forged: bool = False,
|
||||||
|
forged_timestamp: Optional[float] = None,
|
||||||
) -> Optional[SendMessageRequest]:
|
) -> Optional[SendMessageRequest]:
|
||||||
"""
|
"""
|
||||||
Create a message object and checks it, but doesn't send it or save it to the database.
|
Create a message object and checks it, but doesn't send it or save it to the database.
|
||||||
@@ -1822,6 +1824,8 @@ def _internal_prep_message(
|
|||||||
mention_backend=mention_backend,
|
mention_backend=mention_backend,
|
||||||
limit_unread_user_ids=limit_unread_user_ids,
|
limit_unread_user_ids=limit_unread_user_ids,
|
||||||
disable_external_notifications=disable_external_notifications,
|
disable_external_notifications=disable_external_notifications,
|
||||||
|
forged=forged,
|
||||||
|
forged_timestamp=forged_timestamp,
|
||||||
)
|
)
|
||||||
except JsonableError as e:
|
except JsonableError as e:
|
||||||
logging.exception(
|
logging.exception(
|
||||||
@@ -1842,6 +1846,8 @@ def internal_prep_stream_message(
|
|||||||
*,
|
*,
|
||||||
email_gateway: bool = False,
|
email_gateway: bool = False,
|
||||||
limit_unread_user_ids: Optional[Set[int]] = None,
|
limit_unread_user_ids: Optional[Set[int]] = None,
|
||||||
|
forged: bool = False,
|
||||||
|
forged_timestamp: Optional[float] = None,
|
||||||
) -> Optional[SendMessageRequest]:
|
) -> Optional[SendMessageRequest]:
|
||||||
"""
|
"""
|
||||||
See _internal_prep_message for details of how this works.
|
See _internal_prep_message for details of how this works.
|
||||||
@@ -1856,6 +1862,8 @@ def internal_prep_stream_message(
|
|||||||
content=content,
|
content=content,
|
||||||
email_gateway=email_gateway,
|
email_gateway=email_gateway,
|
||||||
limit_unread_user_ids=limit_unread_user_ids,
|
limit_unread_user_ids=limit_unread_user_ids,
|
||||||
|
forged=forged,
|
||||||
|
forged_timestamp=forged_timestamp,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user