From 0b506e30dc489511b113048657a946c8dd3221f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20H=C3=BCbschle-Schneider?= Date: Sun, 18 Mar 2018 16:36:04 +0100 Subject: [PATCH] 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 --- index.html | 2 +- js/inputbar.js | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/index.html b/index.html index c3caae3..b345cca 100644 --- a/index.html +++ b/index.html @@ -334,7 +334,7 @@ npm run build-electron-{windows, darwin, linux} - <>
diff --git a/js/inputbar.js b/js/inputbar.js index 726db97..a219cb9 100644 --- a/js/inputbar.js +++ b/js/inputbar.js @@ -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;