aboutsummaryrefslogtreecommitdiffstats
path: root/util/filters.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2014-08-28 12:05:18 +0100
committerMatthew Wild <mwild1@gmail.com>2014-08-28 12:05:18 +0100
commit656d194bd1e0022605ab0a5b66da7ee2c5a3a1d3 (patch)
treef9b41c73e3cda1b1f3ffe63a3921967eea4a20d6 /util/filters.lua
parentbf66f0049f2e7682ed6354388db92a2b25ea67b6 (diff)
parent878efeecd5030048b33121b05c6cf402f860ca1d (diff)
downloadprosody-656d194bd1e0022605ab0a5b66da7ee2c5a3a1d3.tar.gz
prosody-656d194bd1e0022605ab0a5b66da7ee2c5a3a1d3.zip
Merge 0.10->trunk
Diffstat (limited to 'util/filters.lua')
-rw-r--r--util/filters.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/util/filters.lua b/util/filters.lua
index c2bdca07..427dcb7c 100644
--- a/util/filters.lua
+++ b/util/filters.lua
@@ -45,6 +45,8 @@ function add_filter(session, type, callback, priority)
if not filter_list then
filter_list = {};
session.filters[type] = filter_list;
+ elseif filter_list[callback] then
+ return; -- Filter already added
end
priority = priority or 0;