Make highlight case-insensitive

This commit is contained in:
Igor Zhukov 2015-03-19 21:52:00 +03:00
parent 4e3cde6511
commit 8335b002c9

View File

@ -3862,7 +3862,8 @@ angular.module('myApp.services', ['myApp.i18n', 'izhukov.utils'])
if (match[3]) { // telegram.me links if (match[3]) { // telegram.me links
if (!options.noLinks) { if (!options.noLinks) {
var attr = ''; var attr = '';
if (options.highlightUsername == match[3] && if (options.highlightUsername &&
options.highlightUsername.toLowerCase() == match[3].toLowerCase() &&
match[2] == '@') { match[2] == '@') {
attr = 'class="im_message_mymention"'; attr = 'class="im_message_mymention"';
} }