mirror of
https://github.com/zulip/zulip.git
synced 2025-11-07 15:33:30 +00:00
Automatically subscribe on send when lurking
(imported from commit 636c07346e766615a0012e4532f35d328bb7984d)
This commit is contained in:
@@ -302,6 +302,15 @@ function validate_stream_message() {
|
||||
// browser window doesn't know it.
|
||||
return true;
|
||||
case "not-subscribed":
|
||||
if (lurk_stream.toLowerCase() === stream_name.toLowerCase()) {
|
||||
// Just subscribe them.
|
||||
subs.subscribe_for_send(stream_name);
|
||||
// When the subscription request completes,
|
||||
// subscribe_for_send will send our message (like when
|
||||
// the user clicks on subscribe-and-send).
|
||||
return false;
|
||||
}
|
||||
|
||||
$('#send-status').removeClass(status_classes);
|
||||
$('#stream-nosub-name').text(stream_name);
|
||||
$('#stream-nosub').show();
|
||||
|
||||
Reference in New Issue
Block a user