@all and @channel now highlight like other mentions
Этот коммит содержится в:
@@ -240,6 +240,9 @@ var UserStore = assign({}, EventEmitter.prototype, {
|
|||||||
if (first.length > 0) keys.push(first);
|
if (first.length > 0) keys.push(first);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (user.notify_props.all === "true") keys.push('@all');
|
||||||
|
if (user.notify_props.channel === "true") keys.push('@channel');
|
||||||
|
|
||||||
return keys;
|
return keys;
|
||||||
} else {
|
} else {
|
||||||
return [];
|
return [];
|
||||||
|
|||||||
@@ -421,10 +421,13 @@ module.exports.textToJsx = function(text, options) {
|
|||||||
highlightSearchClass = " search-highlight";
|
highlightSearchClass = " search-highlight";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (explicitMention && UserStore.getProfileByUsername(explicitMention[1])) {
|
if (explicitMention &&
|
||||||
|
(UserStore.getProfileByUsername(explicitMention[1]) ||
|
||||||
|
Constants.SPECIAL_MENTIONS.indexOf(explicitMention[1]) !== -1))
|
||||||
|
{
|
||||||
var name = explicitMention[1];
|
var name = explicitMention[1];
|
||||||
// do both a non-case sensitive and case senstive check
|
// do both a non-case sensitive and case senstive check
|
||||||
var mClass = (name.toLowerCase() in implicitKeywords || name in implicitKeywords) ? mentionClass : "";
|
var mClass = (('@'+name.toLowerCase()) in implicitKeywords || ('@'+name) in implicitKeywords) ? mentionClass : "";
|
||||||
|
|
||||||
var suffix = word.match(puncEndRegex);
|
var suffix = word.match(puncEndRegex);
|
||||||
var prefix = word.match(puncStartRegex);
|
var prefix = word.match(puncStartRegex);
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user