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:
parent
5e99d3416d
commit
156c496a27
@ -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;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user