Software /
code /
prosody
Diff
util/filters.lua @ 6366:8dee696c33cc 0.9.5
util.filters: Ignore filters being added twice (fixes issues on removal)
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Thu, 28 Aug 2014 09:20:33 +0100 |
parent | 5849:8f451d370dd4 |
child | 6367:769a3577dd85 |
line wrap: on
line diff
--- a/util/filters.lua Thu Aug 28 09:17:07 2014 +0100 +++ b/util/filters.lua Thu Aug 28 09:20:33 2014 +0100 @@ -45,6 +45,8 @@ 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;