contentForMessage doesn't have to care about content visibility
This commit is contained in:
parent
d2a30c1d13
commit
ceb31c1947
2 changed files with 5 additions and 6 deletions
|
@ -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) {
|
||||
|
|
|
@ -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,8 +66,7 @@ plugins.service('plugins', ['userPlugins', '$sce', function(userPlugins, $sce) {
|
|||
|
||||
var pluginContent = plugins[i].contentForMessage(message.text);
|
||||
if (pluginContent) {
|
||||
pluginContent = {'visible': visible,
|
||||
'content': $sce.trustAsHtml(pluginContent),
|
||||
pluginContent = {'content': $sce.trustAsHtml(pluginContent),
|
||||
'nsfw': nsfw,
|
||||
'name': plugins[i].name };
|
||||
|
||||
|
|
Loading…
Reference in a new issue