aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2018-08-18 14:38:18 +0100
committerMatthew Wild <mwild1@gmail.com>2018-08-18 14:38:18 +0100
commit61efe5330e3a1f8111973dbbb055d1d3275adc15 (patch)
tree2ec60f8983d2ca81c1356cbf4dec73a416b177a0
parent0a0695d96bce2a3e4c5edaeb6ace2e2d3b47546b (diff)
downloadprosody-61efe5330e3a1f8111973dbbb055d1d3275adc15.tar.gz
prosody-61efe5330e3a1f8111973dbbb055d1d3275adc15.zip
mod_pep: Simplify code
-rw-r--r--plugins/mod_pep.lua3
1 files changed, 1 insertions, 2 deletions
diff --git a/plugins/mod_pep.lua b/plugins/mod_pep.lua
index 50cf3ff1..0d52a2fd 100644
--- a/plugins/mod_pep.lua
+++ b/plugins/mod_pep.lua
@@ -253,8 +253,7 @@ end
local function resend_last_item(jid, node, service)
local ok, id, item = service:get_last_item(node, jid);
- if not ok then return; end
- if not id then return; end
+ if not (ok and id) then return; end
service.config.broadcaster("items", node, { [jid] = true }, item);
end