mirror of
https://github.com/discourse/discourse.git
synced 2025-05-23 15:41:12 +08:00
FIX: If a group is unmentionable, don't render it as mentionable
Now if a group is visible but unmentionable, users can search for it when composing by typing with `@`, but it will be rendered without the grey background color. It will also no longer pop up a JIT warning saying "You are about to mention X people" because the group will not be mentioned.
This commit is contained in:
@ -308,7 +308,7 @@ class UsersController < ApplicationController
|
||||
groups = Group.where(name: usernames).pluck(:name)
|
||||
mentionable_groups =
|
||||
if current_user
|
||||
Group.mentionable(current_user)
|
||||
Group.mentionable(current_user, include_public: false)
|
||||
.where(name: usernames)
|
||||
.pluck(:name, :user_count)
|
||||
.map do |name, user_count|
|
||||
|
Reference in New Issue
Block a user