aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/mod_pep.lua
diff options
context:
space:
mode:
authorWaqas Hussain <waqas20@gmail.com>2009-07-02 00:43:32 +0500
committerWaqas Hussain <waqas20@gmail.com>2009-07-02 00:43:32 +0500
commit584995d0516cf596b96d4688db94d84155a12d1f (patch)
tree7ce54e4a0b343b5e79719fd036f83907c0607d9b /plugins/mod_pep.lua
parentc1671142d38ccd0a9295b4c7ea3f4d2d90e572e8 (diff)
downloadprosody-584995d0516cf596b96d4688db94d84155a12d1f.tar.gz
prosody-584995d0516cf596b96d4688db94d84155a12d1f.zip
mod_pep: Fixed boolean indexing error while casting all messages for a user
Diffstat (limited to 'plugins/mod_pep.lua')
-rw-r--r--plugins/mod_pep.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/mod_pep.lua b/plugins/mod_pep.lua
index 4a8300f1..c6811928 100644
--- a/plugins/mod_pep.lua
+++ b/plugins/mod_pep.lua
@@ -54,8 +54,9 @@ local function publish_all(user, recipient, session)
local d = data[user];
local notify = recipients[user] and recipients[user][recipient];
if d and notify then
- for node, message in pairs(notify) do
- if d[node] then
+ for node in pairs(notify) do
+ local message = d[node];
+ if message then
message.attr.to = recipient;
session.send(message);
end