25
1
mirror of https://github.com/processone/ejabberd.git synced 2024-11-22 16:20:52 +01:00

fix send last item issue

SVN Revision: 2561
This commit is contained in:
Christophe Romain 2009-08-28 00:09:21 +00:00
parent fab29f4cf0
commit de78508f45
2 changed files with 5 additions and 5 deletions

View File

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

View File

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