UX: hide warning if all users mentioned via group are already invited. (#23557)

Previously, a "`some_not_allowed`" warning message was appeared in composer even when all the users mentioned via group are already invited to the private message directly or via other groups.
This commit is contained in:
Vinoth Kannan
2023-09-13 19:21:44 +05:30
committed by GitHub
parent 7f7e7fe516
commit e4849445ce
2 changed files with 15 additions and 3 deletions

View File

@ -65,8 +65,12 @@ class ComposerController < ApplicationController
.count
if notified_count > 0
group_reasons[group.name] = :some_not_allowed
serialized_group[:notified_count] = notified_count
if notified_count == group.user_count
group_reasons.delete(group.name)
else
group_reasons[group.name] = :some_not_allowed
serialized_group[:notified_count] = notified_count
end
end
end