mirror of
https://github.com/discourse/discourse.git
synced 2025-05-21 18:12:32 +08:00
FIX: invite to message was not allowing groups
Previously we were incorrectly checking mentionable instead of messageable Also fix edge case where multiple groups sharing a name mean that exact match override is not working Also cleans up params sent to user selector
This commit is contained in:
@ -751,6 +751,7 @@ class UsersController < ApplicationController
|
||||
if include_groups || groups
|
||||
groups = Group.search_groups(term, groups: groups)
|
||||
groups = groups.where(visibility_level: Group.visibility_levels[:public]) if include_groups
|
||||
groups = groups.order('groups.name asc')
|
||||
|
||||
to_render[:groups] = groups.map do |m|
|
||||
{ name: m.name, full_name: m.full_name }
|
||||
|
Reference in New Issue
Block a user