mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 05:48:16 +08:00
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:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user