streams: Remove "email_address" field from Subscription objects.

This commit removes "email_address" field from Subscription objects
and we would instead a new endpoint in next commit to get email
address for stream with proper access check.

This change also fixes the bug where we would include email address
for the unsubscribed private stream as well when user did not have
permission to send message to the stream, and having email allowed
the unsubscribed user to send message to the stream.

Note that the unsubscribed user can still send message to the stream
if the user had noted down the email before being unsubscribed
and the stream token is not changed after unsubscribing the user.
This commit is contained in:
Sahil Batra
2023-09-29 23:08:07 +05:30
committed by Alex Vandiver
parent 9636362cbd
commit 0a3800332f
9 changed files with 44 additions and 78 deletions

View File

@@ -686,7 +686,6 @@ exports.fixtures = {
audible_notifications: true,
color: "blue",
desktop_notifications: false,
email_address: "whatever",
email_notifications: false,
in_home_view: false,
is_muted: true,