mod_pep: Simplify code
authorMatthew Wild <mwild1@gmail.com>
Sat, 18 Aug 2018 14:38:18 +0100
changeset 9208 2e710b618440
parent 9207 c5a81acc1fc3
child 9209 33ee40dc3e25
mod_pep: Simplify code
plugins/mod_pep.lua
--- a/plugins/mod_pep.lua	Sat Aug 18 14:33:49 2018 +0100
+++ b/plugins/mod_pep.lua	Sat Aug 18 14:38:18 2018 +0100
@@ -253,8 +253,7 @@
 
 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