mirror of
https://github.com/processone/ejabberd.git
synced 2024-11-22 16:20:52 +01:00
Fix pubsub_publish_item_ hook call parameter and jid conversion on node_hometree.
published messages are delivered to subscribers (flat nodes). SVN Revision: 2537
This commit is contained in:
parent
a1a6469ed0
commit
4d5bfe2ee8
@ -2037,7 +2037,8 @@ publish_item(Host, ServerHost, Node, Publisher, ItemId, Payload) ->
|
|||||||
node_call(Type, publish_item, [NodeId, Publisher, PublishModel, MaxItems, ItemId, Payload])
|
node_call(Type, publish_item, [NodeId, Publisher, PublishModel, MaxItems, ItemId, Payload])
|
||||||
end
|
end
|
||||||
end,
|
end,
|
||||||
ejabberd_hooks:run(pubsub_publish_item, ServerHost, [ServerHost, Node, Publisher, service_jid(Host), ItemId, Payload]),
|
ServerHostB = list_to_binary(ServerHost),
|
||||||
|
ejabberd_hooks:run(pubsub_publish_item, ServerHostB, [ServerHost, Node, Publisher, service_jid(Host), ItemId, Payload]),
|
||||||
Reply = #xmlel{ns = ?NS_PUBSUB, name = 'pubsub', children =
|
Reply = #xmlel{ns = ?NS_PUBSUB, name = 'pubsub', children =
|
||||||
[#xmlel{ns = ?NS_PUBSUB, name = 'publish', attrs = nodeAttr(Node), children =
|
[#xmlel{ns = ?NS_PUBSUB, name = 'publish', attrs = nodeAttr(Node), children =
|
||||||
[#xmlel{ns = ?NS_PUBSUB, name = 'item', attrs = itemAttr(ItemId)}]}]},
|
[#xmlel{ns = ?NS_PUBSUB, name = 'item', attrs = itemAttr(ItemId)}]}]},
|
||||||
|
@ -460,7 +460,7 @@ delete_subscription(SubKey, NodeID, {Subscription, SubId}, SubState) ->
|
|||||||
%% <p>In the default plugin module, the record is unchanged.</p>
|
%% <p>In the default plugin module, the record is unchanged.</p>
|
||||||
publish_item(NodeId, Publisher, PublishModel, MaxItems, ItemId, Payload) ->
|
publish_item(NodeId, Publisher, PublishModel, MaxItems, ItemId, Payload) ->
|
||||||
SubKey = jlib:short_prepd_jid(Publisher),
|
SubKey = jlib:short_prepd_jid(Publisher),
|
||||||
GenKey = jlib:short_prepd_bare_jid(SubKey),
|
GenKey = jlib:short_prepd_bare_jid(Publisher),
|
||||||
GenState = get_state(NodeId, GenKey),
|
GenState = get_state(NodeId, GenKey),
|
||||||
SubState = case SubKey of
|
SubState = case SubKey of
|
||||||
GenKey -> GenState;
|
GenKey -> GenState;
|
||||||
|
Loading…
Reference in New Issue
Block a user