mirror of
https://github.com/zulip/zulip.git
synced 2025-11-02 21:13:36 +00:00
message: Do not include details of inaccessible users in message data.
This commit adds code to not include original details of senders like name, email and avatar url in the message objects sent through events and in the response of endpoint used to fetch messages. This is the last major commit for the project to add support for limiting guest access to an entire organization. Fixes #10970.
This commit is contained in:
@@ -55,7 +55,7 @@ class EditMessageTestCase(ZulipTestCase):
|
||||
|
||||
def check_message(self, msg_id: int, topic_name: str, content: str) -> None:
|
||||
# Make sure we saved the message correctly to the DB.
|
||||
msg = Message.objects.get(id=msg_id)
|
||||
msg = Message.objects.select_related("realm").get(id=msg_id)
|
||||
self.assertEqual(msg.topic_name(), topic_name)
|
||||
self.assertEqual(msg.content, content)
|
||||
|
||||
@@ -75,6 +75,8 @@ class EditMessageTestCase(ZulipTestCase):
|
||||
apply_markdown=False,
|
||||
client_gravatar=False,
|
||||
allow_edit_history=True,
|
||||
user_profile=None,
|
||||
realm=msg.realm,
|
||||
)
|
||||
|
||||
self.assert_length(queries, 1)
|
||||
|
||||
Reference in New Issue
Block a user