From 6b38d19085aa592af6e9fd46e5940f958e89cac8 Mon Sep 17 00:00:00 2001 From: Christophe Romain Date: Fri, 8 Jul 2016 15:18:39 +0200 Subject: [PATCH] Do send last items only for subscription on current plugin type --- src/mod_pubsub.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mod_pubsub.erl b/src/mod_pubsub.erl index f9d1cde21..81afc9a06 100644 --- a/src/mod_pubsub.erl +++ b/src/mod_pubsub.erl @@ -418,7 +418,8 @@ send_loop(State) -> {_, Node} = NodeRec#pubsub_node.nodeid, Nidx = NodeRec#pubsub_node.id, Options = NodeRec#pubsub_node.options, - send_items(Host, Node, Nidx, PType, Options, SubJID, last) + [send_items(Host, Node, Nidx, PType, Options, SubJID, last) + || NodeRec#pubsub_node.type == PType] end, lists:usort(Subs)) end,