Made search autocomplete for channels and users case insensitive (#3965)
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
b8d6eba788
Коммит
3b739e1ca5
@@ -31,7 +31,7 @@ class SearchChannelSuggestion extends Suggestion {
|
|||||||
|
|
||||||
export default class SearchChannelProvider {
|
export default class SearchChannelProvider {
|
||||||
handlePretextChanged(suggestionId, pretext) {
|
handlePretextChanged(suggestionId, pretext) {
|
||||||
const captured = (/\b(?:in|channel):\s*(\S*)$/i).exec(pretext);
|
const captured = (/\b(?:in|channel):\s*(\S*)$/i).exec(pretext.toLowerCase());
|
||||||
if (captured) {
|
if (captured) {
|
||||||
const channelPrefix = captured[1];
|
const channelPrefix = captured[1];
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class SearchUserSuggestion extends Suggestion {
|
|||||||
|
|
||||||
export default class SearchUserProvider {
|
export default class SearchUserProvider {
|
||||||
handlePretextChanged(suggestionId, pretext) {
|
handlePretextChanged(suggestionId, pretext) {
|
||||||
const captured = (/\bfrom:\s*(\S*)$/i).exec(pretext);
|
const captured = (/\bfrom:\s*(\S*)$/i).exec(pretext.toLowerCase());
|
||||||
if (captured) {
|
if (captured) {
|
||||||
const usernamePrefix = captured[1];
|
const usernamePrefix = captured[1];
|
||||||
|
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user