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: Fix buggy message post policy warning.

Tim Abbott4f930688cf29
diff --git a/static/js/compose.js b/static/js/compose.js
index 00ecb4c71cf..2f56b71949a 100644
--- a/static/js/compose.js
+++ b/static/js/compose.js
@@ -541,7 +541,7 @@ function validate_stream_message_post_policy(sub) {
const person = people.get_by_user_id(page_params.user_id);
const current_datetime = new Date(Date.now());
const person_date_joined = new Date(person.date_joined);
- const days = new Date(current_datetime - person_date_joined).getDate();
+ const days = (current_datetime - person_date_joined) / 1000 / 86400;
let error_text;
if (
stream_post_policy === stream_post_permission_type.non_new_members.code &&