autocomplete: fix usernames not being highlighted in @mentions.
Fix usernames not being highlighted when completing @mentions. This also changes it so the autocomplete results don't include the '@' in front of the name. Minor breaking change to the /autocomplete.json API. Autocomplete results for mentions now have the type `mention` instead of `user`.
This commit is contained in:
@@ -362,7 +362,7 @@ class AutocompleteService
|
||||
# @return [Array<Hash>] the autocomplete results
|
||||
def autocomplete_mention(string)
|
||||
autocomplete_user(string).map do |result|
|
||||
{ **result, value: "@" + result[:value] }
|
||||
{ **result, type: "mention", value: "@" + result[:value] }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user