]> granicus.if.org Git - ejabberd/commitdiff
fix send last item issue
authorChristophe Romain <christophe.romain@process-one.net>
Fri, 28 Aug 2009 00:06:28 +0000 (00:06 +0000)
committerChristophe Romain <christophe.romain@process-one.net>
Fri, 28 Aug 2009 00:06:28 +0000 (00:06 +0000)
SVN Revision: 2560

src/mod_pubsub/mod_pubsub.erl
src/mod_pubsub/pubsub_odbc.patch

index de279a1a69caae2841c26ddcf6cc6beeb764a7dd..ec7a420758fbc73b11dab7ea33b02e7a9edaf68f 100644 (file)
@@ -467,10 +467,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;
index 4262ca484c5cf4f78dc3fe787e20c5606e3ab041..dffc90f064e373274da28f3196264d4a4def12f0 100644 (file)
@@ -1,4 +1,4 @@
---- mod_pubsub.erl     2009-08-28 00:36:21.000000000 +0200
+--- mod_pubsub.erl     2009-08-28 02:05:49.000000000 +0200
 +++ mod_pubsub_odbc.erl        2009-08-28 00:36:01.000000000 +0200
 @@ -45,7 +45,7 @@
  %%% TODO
            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;