aboutsummaryrefslogtreecommitdiffstats
path: root/util/filters.lua
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2014-08-28 09:23:24 +0100
committerMatthew Wild <mwild1@gmail.com>2014-08-28 09:23:24 +0100
commit878efeecd5030048b33121b05c6cf402f860ca1d (patch)
tree29a8b368a2ebd36175100726d9d02b82b27edc8c /util/filters.lua
parent6007de18c4db1acae2bb17c9d2aaad3b1ef994f5 (diff)
parentb27e7b3834519214f9b3c9e6e041421429bbcc74 (diff)
downloadprosody-878efeecd5030048b33121b05c6cf402f860ca1d.tar.gz
prosody-878efeecd5030048b33121b05c6cf402f860ca1d.zip
Merge 0.9->0.10
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;