Made search autocomplete for channels and users case insensitive (#3965)

Этот коммит содержится в:
Harrison Healey
2016-09-12 10:00:24 -04:00
коммит произвёл Christopher Speller
родитель b8d6eba788
Коммит 3b739e1ca5
2 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@@ -31,7 +31,7 @@ class SearchChannelSuggestion extends Suggestion {
export default class SearchChannelProvider {
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) {
const channelPrefix = captured[1];

Просмотреть файл

@@ -35,7 +35,7 @@ class SearchUserSuggestion extends Suggestion {
export default class SearchUserProvider {
handlePretextChanged(suggestionId, pretext) {
const captured = (/\bfrom:\s*(\S*)$/i).exec(pretext);
const captured = (/\bfrom:\s*(\S*)$/i).exec(pretext.toLowerCase());
if (captured) {
const usernamePrefix = captured[1];