From 571f6b1e915c2837374e5e0b7357e6515a8c8d99 Mon Sep 17 00:00:00 2001 From: N-Shar-ma Date: Sat, 10 Dec 2022 20:01:27 +0530 Subject: [PATCH] message_edit: Fix the name of a property being accessed wrongly. The `stream_id` property of a stream object was being wrongly accessed as `id`, which does not exist, in the function `get_available_streams_for_moving_messages()` This led to the current stream not being rendered in the dropdown list as expected in the `Move Topic` modal when the user does not have the permission to post in the current stream. --- static/js/message_edit.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/js/message_edit.js b/static/js/message_edit.js index c7253c18aa..ec39323211 100644 --- a/static/js/message_edit.js +++ b/static/js/message_edit.js @@ -413,7 +413,7 @@ export function get_available_streams_for_moving_messages(current_stream_id) { return stream_data .subscribed_subs() .filter((stream) => { - if (stream.id === current_stream_id) { + if (stream.stream_id === current_stream_id) { return true; } return stream_data.can_post_messages_in_stream(stream);