Don't insert mention when clicking non-privmsg
This goes in the direction of #860 but actually removing the tag seems to be rather more involved
This commit is contained in:
parent
813fe93355
commit
0b506e30dc
@ -334,7 +334,7 @@ npm run build-electron-{windows, darwin, linux}</pre>
|
||||
<span class="cof-chat_time cob-chat_time coa-chat_time" ng-bind-html="::bufferline.formattedTime"></span>
|
||||
</span>
|
||||
</td>
|
||||
<td class="prefix"><span ng-class="::{'repeated-prefix': bufferline.prefixtext==bufferlines[$index-1].prefixtext}"><a ng-click="addMention(bufferline.prefix)"><span class="hidden-bracket" ng-if="::(bufferline.showHiddenBrackets)"><</span><span ng-repeat="part in ::bufferline.prefix" ng-class="::part.classes" ng-bind="::part.text|prefixlimit:25"></span><span class="hidden-bracket" ng-if="::(bufferline.showHiddenBrackets)">></span></a></span></td><!--
|
||||
<td class="prefix"><span ng-class="::{'repeated-prefix': bufferline.prefixtext==bufferlines[$index-1].prefixtext}"><a ng-click="addMention(bufferline)"><span class="hidden-bracket" ng-if="::(bufferline.showHiddenBrackets)"><</span><span ng-repeat="part in ::bufferline.prefix" ng-class="::part.classes" ng-bind="::part.text|prefixlimit:25"></span><span class="hidden-bracket" ng-if="::(bufferline.showHiddenBrackets)">></span></a></span></td><!--
|
||||
--><td class="message"><!--
|
||||
--><div ng-repeat="metadata in ::bufferline.metadata" plugin data="::metadata"></div><!--
|
||||
--><span ng-repeat="part in ::bufferline.content" class="text" ng-class="::part.classes.concat(['line-' + part.$$hashKey.replace(':','_')])" ng-bind-html="::part.text | linky:'_blank':{rel:'noopener noreferrer'} | DOMfilter:'irclinky' | DOMfilter:'emojify':settings.enableJSEmoji | DOMfilter:'inlinecolour' | DOMfilter:'latexmath':('.line-' + part.$$hashKey.replace(':','_')):settings.enableMathjax"></span>
|
||||
|
@ -208,7 +208,12 @@ weechat.directive('inputBar', function() {
|
||||
};
|
||||
|
||||
//XXX THIS DOES NOT BELONG HERE!
|
||||
$rootScope.addMention = function(prefix) {
|
||||
$rootScope.addMention = function(bufferline) {
|
||||
if (!bufferline.showHiddenBrackets) {
|
||||
// the line is a notice or action or something else that doesn't belong
|
||||
return;
|
||||
}
|
||||
var prefix = bufferline.prefix;
|
||||
// Extract nick from bufferline prefix
|
||||
var nick = prefix[prefix.length - 1].text;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user