From de78508f45a1bab9d89fd71eb38e0b5e132e419e Mon Sep 17 00:00:00 2001 From: Christophe Romain Date: Fri, 28 Aug 2009 00:09:21 +0000 Subject: [PATCH] fix send last item issue SVN Revision: 2561 --- src/mod_pubsub/mod_pubsub.erl | 4 ++-- src/mod_pubsub/pubsub_odbc.patch | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/mod_pubsub/mod_pubsub.erl b/src/mod_pubsub/mod_pubsub.erl index 03f0095ea..dd2400006 100644 --- a/src/mod_pubsub/mod_pubsub.erl +++ b/src/mod_pubsub/mod_pubsub.erl @@ -476,10 +476,10 @@ send_loop(State) -> lists:foreach( fun({Node, subscribed, _, SubJID}) -> if (SubJID == LJID) or (SubJID == BJID) -> - #pubsub_node{options = Options, type = Type, id = NodeId} = Node, + #pubsub_node{nodeid = {H, N}, type = Type, id = NodeId, options = Options} = Node, case get_option(Options, send_last_published_item) of on_sub_and_presence -> - send_items(Host, Node, NodeId, Type, SubJID, last); + send_items(H, N, NodeId, Type, SubJID, last); _ -> ok end; diff --git a/src/mod_pubsub/pubsub_odbc.patch b/src/mod_pubsub/pubsub_odbc.patch index 0a6d6ed67..c7eec7b9a 100644 --- a/src/mod_pubsub/pubsub_odbc.patch +++ b/src/mod_pubsub/pubsub_odbc.patch @@ -1,4 +1,4 @@ ---- mod_pubsub.erl 2009-08-28 01:07:30.000000000 +0200 +--- mod_pubsub.erl 2009-08-28 02:08:43.000000000 +0200 +++ mod_pubsub_odbc.erl 2009-08-28 01:08:15.000000000 +0200 @@ -45,7 +45,7 @@ %%% TODO @@ -239,10 +239,10 @@ lists:foreach( fun({Node, subscribed, _, SubJID}) -> if (SubJID == LJID) or (SubJID == BJID) -> -- #pubsub_node{options = Options, type = Type, id = NodeId} = Node, +- #pubsub_node{nodeid = {H, N}, type = Type, id = NodeId, options = Options} = Node, - case get_option(Options, send_last_published_item) of - on_sub_and_presence -> -- send_items(Host, Node, NodeId, Type, SubJID, last); +- send_items(H, N, NodeId, Type, SubJID, last); - _ -> - ok - end;