Software /
code /
prosody
Comparison
plugins/mod_pep.lua @ 1332:f7fed9f77455
mod_pep: Fix a nil index bug
author | Waqas Hussain <waqas20@gmail.com> |
---|---|
date | Fri, 12 Jun 2009 13:06:41 +0500 |
parent | 1327:20285e9d71ee |
child | 1335:7c71783b40cf |
comparison
equal
deleted
inserted
replaced
1327:20285e9d71ee | 1332:f7fed9f77455 |
---|---|
49 local t = stanza.attr.type; | 49 local t = stanza.attr.type; |
50 local recipient = stanza.attr.from; | 50 local recipient = stanza.attr.from; |
51 if t == "unavailable" or t == "error" then | 51 if t == "unavailable" or t == "error" then |
52 if recipients[user] then recipients[user][recipient] = nil; end | 52 if recipients[user] then recipients[user][recipient] = nil; end |
53 elseif not t then | 53 elseif not t then |
54 recipients[user] = recipients[user][recipient] or {}; | 54 recipients[user] = recipients[user] or {}; |
55 if not recipients[user][recipient] then | 55 if not recipients[user][recipient] then |
56 recipients[user][recipient] = true; | 56 recipients[user][recipient] = true; |
57 for node, message in pairs(data[user] or {}) do | 57 for node, message in pairs(data[user] or {}) do |
58 message.attr.to = stanza.attr.from; | 58 message.attr.to = stanza.attr.from; |
59 origin.send(message); | 59 origin.send(message); |