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: Do not include deactivated users for group as DM recipient.

Sahil Batraa3af0250a059
diff --git a/web/src/composebox_typeahead.js b/web/src/composebox_typeahead.js
index 3836552ebce..9091bce3333 100644
--- a/web/src/composebox_typeahead.js
+++ b/web/src/composebox_typeahead.js
@@ -1193,10 +1193,15 @@ export function initialize({on_enter_send}) {
if (user_groups.is_user_group(item)) {
for (const user_id of item.members) {
const user = people.get_by_user_id(user_id);
- // filter out inserted users and current user from pill insertion
+ // filter out inactive users, inserted users and current user
+ // from pill insertion
const inserted_users = user_pill.get_user_ids(compose_pm_pill.widget);
const current_user = people.is_current_user(user.email);
- if (!inserted_users.includes(user.user_id) && !current_user) {
+ if (
+ people.is_person_active(user_id) &&
+ !inserted_users.includes(user.user_id) &&
+ !current_user
+ ) {
compose_pm_pill.set_from_typeahead(user);
}
}