contentForMessage doesn't have to care about content visibility

This commit is contained in:
David Cormier 2014-07-25 17:32:55 -04:00
parent d2a30c1d13
commit ceb31c1947
2 changed files with 5 additions and 6 deletions

View file

@ -63,7 +63,7 @@ weechat.factory('handlers', ['$rootScope', '$log', 'models', 'plugins', function
buffer.requestedLines++;
// Only react to line if its displayed
if (message.displayed) {
message = plugins.PluginManager.contentForMessage(message, $rootScope.visible);
message = plugins.PluginManager.contentForMessage(message);
buffer.addLine(message);
if (manually) {

View file

@ -53,7 +53,7 @@ plugins.service('plugins', ['userPlugins', '$sce', function(userPlugins, $sce) {
* Iterates through all the registered plugins
* and run their contentForMessage function.
*/
var contentForMessage = function(message, visible) {
var contentForMessage = function(message) {
message.metadata = [];
for (var i = 0; i < plugins.length; i++) {
@ -66,10 +66,9 @@ plugins.service('plugins', ['userPlugins', '$sce', function(userPlugins, $sce) {
var pluginContent = plugins[i].contentForMessage(message.text);
if (pluginContent) {
pluginContent = {'visible': visible,
'content': $sce.trustAsHtml(pluginContent),
'nsfw': nsfw,
'name': plugins[i].name };
pluginContent = {'content': $sce.trustAsHtml(pluginContent),
'nsfw': nsfw,
'name': plugins[i].name };
message.metadata.push(pluginContent);