25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-24 16:23:40 +01:00

fix send last item issue

SVN Revision: 2560
This commit is contained in:
Christophe Romain 2009-08-28 00:06:28 +00:00
parent 5e99d3416d
commit 156c496a27
2 changed files with 5 additions and 5 deletions

View 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;

View 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
@ -240,10 +240,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;