Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

compose: Prompt user to login when trying to compose.

Aman Agrawalfcfc81cdf346
diff --git a/static/js/compose_actions.js b/static/js/compose_actions.js
index 722c8e9adb9..1f4f22ad05b 100644
--- a/static/js/compose_actions.js
+++ b/static/js/compose_actions.js
@@ -15,6 +15,7 @@ import * as compose_validate from "./compose_validate";
import * as drafts from "./drafts";
import * as hash_util from "./hash_util";
import {$t} from "./i18n";
+import * as login_to_access from "./login_to_access";
import * as message_lists from "./message_lists";
import * as message_viewport from "./message_viewport";
import * as narrow_state from "./narrow_state";
@@ -214,6 +215,11 @@ export function update_placeholder_text() {
}
export function start(msg_type, opts) {
+ if (page_params.is_spectator) {
+ login_to_access.show();
+ return;
+ }
+
autosize_message_content();
if (reload_state.is_in_progress()) {