From c958fa2f0602bd98319c4d83f54ded8fb7623808 Mon Sep 17 00:00:00 2001
From: Holger Weiss
In the default plugin module, the record is unchanged.
-publish_item(Nidx, Publisher, PublishModel, MaxItems, ItemId, Payload) -> +publish_item(Nidx, Publisher, PublishModel, MaxItems, ItemId, Payload, + _PubOpts) -> SubKey = jid:tolower(Publisher), GenKey = jid:remove_resource(SubKey), GenState = get_state(Nidx, GenKey), diff --git a/src/node_flat_sql.erl b/src/node_flat_sql.erl index ea3aa7d3c..7cc2b6309 100644 --- a/src/node_flat_sql.erl +++ b/src/node_flat_sql.erl @@ -39,7 +39,7 @@ -export([init/3, terminate/2, options/0, features/0, create_node_permission/6, create_node/2, delete_node/1, purge_node/2, subscribe_node/8, unsubscribe_node/4, - publish_item/6, delete_item/4, remove_extra_items/3, + publish_item/7, delete_item/4, remove_extra_items/3, get_entity_affiliations/2, get_node_affiliations/1, get_affiliation/2, set_affiliation/3, get_entity_subscriptions/2, get_node_subscriptions/1, @@ -217,7 +217,8 @@ delete_subscription(SubKey, Nidx, {Subscription, SubId}, Affiliation, Subscripti _ -> update_subscription(Nidx, SubKey, NewSubs) end. -publish_item(Nidx, Publisher, PublishModel, MaxItems, ItemId, Payload) -> +publish_item(Nidx, Publisher, PublishModel, MaxItems, ItemId, Payload, + _PubOpts) -> SubKey = jid:tolower(Publisher), GenKey = jid:remove_resource(SubKey), {Affiliation, Subscriptions} = select_affiliation_subscriptions(Nidx, GenKey, SubKey), diff --git a/src/node_hometree.erl b/src/node_hometree.erl index 2d26c0eeb..def7b983d 100644 --- a/src/node_hometree.erl +++ b/src/node_hometree.erl @@ -33,7 +33,7 @@ -export([init/3, terminate/2, options/0, features/0, create_node_permission/6, create_node/2, delete_node/1, purge_node/2, subscribe_node/8, unsubscribe_node/4, - publish_item/6, delete_item/4, remove_extra_items/3, + publish_item/7, delete_item/4, remove_extra_items/3, get_entity_affiliations/2, get_node_affiliations/1, get_affiliation/2, set_affiliation/3, get_entity_subscriptions/2, get_node_subscriptions/1, @@ -99,8 +99,9 @@ subscribe_node(Nidx, Sender, Subscriber, AccessModel, unsubscribe_node(Nidx, Sender, Subscriber, SubId) -> node_flat:unsubscribe_node(Nidx, Sender, Subscriber, SubId). -publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload) -> - node_flat:publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload). +publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload, PubOpts) -> + node_flat:publish_item(Nidx, Publisher, Model, MaxItems, ItemId, + Payload, PubOpts). remove_extra_items(Nidx, MaxItems, ItemIds) -> node_flat:remove_extra_items(Nidx, MaxItems, ItemIds). diff --git a/src/node_hometree_sql.erl b/src/node_hometree_sql.erl index 4ce6f8554..d9af49843 100644 --- a/src/node_hometree_sql.erl +++ b/src/node_hometree_sql.erl @@ -33,7 +33,7 @@ -export([init/3, terminate/2, options/0, features/0, create_node_permission/6, create_node/2, delete_node/1, purge_node/2, subscribe_node/8, unsubscribe_node/4, - publish_item/6, delete_item/4, remove_extra_items/3, + publish_item/7, delete_item/4, remove_extra_items/3, get_entity_affiliations/2, get_node_affiliations/1, get_affiliation/2, set_affiliation/3, get_entity_subscriptions/2, get_node_subscriptions/1, @@ -77,8 +77,9 @@ subscribe_node(Nidx, Sender, Subscriber, AccessModel, unsubscribe_node(Nidx, Sender, Subscriber, SubId) -> node_flat_sql:unsubscribe_node(Nidx, Sender, Subscriber, SubId). -publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload) -> - node_flat_sql:publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload). +publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload, PubOpts) -> + node_flat_sql:publish_item(Nidx, Publisher, Model, MaxItems, ItemId, + Payload, PubOpts). remove_extra_items(Nidx, MaxItems, ItemIds) -> node_flat_sql:remove_extra_items(Nidx, MaxItems, ItemIds). diff --git a/src/node_mb.erl b/src/node_mb.erl index 0bfb51ecc..6c7f09780 100644 --- a/src/node_mb.erl +++ b/src/node_mb.erl @@ -46,7 +46,7 @@ -export([init/3, terminate/2, options/0, features/0, create_node_permission/6, create_node/2, delete_node/1, purge_node/2, subscribe_node/8, unsubscribe_node/4, - publish_item/6, delete_item/4, remove_extra_items/3, + publish_item/7, delete_item/4, remove_extra_items/3, get_entity_affiliations/2, get_node_affiliations/1, get_affiliation/2, set_affiliation/3, get_entity_subscriptions/2, get_node_subscriptions/1, @@ -116,8 +116,9 @@ subscribe_node(Nidx, Sender, Subscriber, AccessModel, unsubscribe_node(Nidx, Sender, Subscriber, SubId) -> node_pep:unsubscribe_node(Nidx, Sender, Subscriber, SubId). -publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload) -> - node_pep:publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload). +publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload, PubOpts) -> + node_pep:publish_item(Nidx, Publisher, Model, MaxItems, ItemId, + Payload, PubOpts). remove_extra_items(Nidx, MaxItems, ItemIds) -> node_pep:remove_extra_items(Nidx, MaxItems, ItemIds). diff --git a/src/node_mix.erl b/src/node_mix.erl index b57d58493..71a8d3180 100644 --- a/src/node_mix.erl +++ b/src/node_mix.erl @@ -14,7 +14,7 @@ -export([init/3, terminate/2, options/0, features/0, create_node_permission/6, create_node/2, delete_node/1, purge_node/2, subscribe_node/8, unsubscribe_node/4, - publish_item/6, delete_item/4, remove_extra_items/3, + publish_item/7, delete_item/4, remove_extra_items/3, get_entity_affiliations/2, get_node_affiliations/1, get_affiliation/2, set_affiliation/3, get_entity_subscriptions/2, get_node_subscriptions/1, @@ -89,8 +89,9 @@ subscribe_node(Nidx, Sender, Subscriber, AccessModel, unsubscribe_node(Nidx, Sender, Subscriber, SubId) -> node_flat:unsubscribe_node(Nidx, Sender, Subscriber, SubId). -publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload) -> - node_flat:publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload). +publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload, PubOpts) -> + node_flat:publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload, + PubOpts). remove_extra_items(Nidx, MaxItems, ItemIds) -> node_flat:remove_extra_items(Nidx, MaxItems, ItemIds). diff --git a/src/node_mix_sql.erl b/src/node_mix_sql.erl index b5b9a94eb..cbe0b3d02 100644 --- a/src/node_mix_sql.erl +++ b/src/node_mix_sql.erl @@ -14,7 +14,7 @@ -export([init/3, terminate/2, options/0, features/0, create_node_permission/6, create_node/2, delete_node/1, purge_node/2, subscribe_node/8, unsubscribe_node/4, - publish_item/6, delete_item/4, remove_extra_items/3, + publish_item/7, delete_item/4, remove_extra_items/3, get_entity_affiliations/2, get_node_affiliations/1, get_affiliation/2, set_affiliation/3, get_entity_subscriptions/2, get_node_subscriptions/1, @@ -89,8 +89,9 @@ subscribe_node(Nidx, Sender, Subscriber, AccessModel, unsubscribe_node(Nidx, Sender, Subscriber, SubId) -> node_flat_sql:unsubscribe_node(Nidx, Sender, Subscriber, SubId). -publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload) -> - node_flat_sql:publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload). +publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload, PubOpts) -> + node_flat_sql:publish_item(Nidx, Publisher, Model, MaxItems, ItemId, + Payload, PubOpts). remove_extra_items(Nidx, MaxItems, ItemIds) -> node_flat_sql:remove_extra_items(Nidx, MaxItems, ItemIds). diff --git a/src/node_online.erl b/src/node_online.erl index ea492fc85..1c2ab5a03 100644 --- a/src/node_online.erl +++ b/src/node_online.erl @@ -33,7 +33,7 @@ -export([init/3, terminate/2, options/0, features/0, create_node_permission/6, create_node/2, delete_node/1, purge_node/2, subscribe_node/8, unsubscribe_node/4, - publish_item/6, delete_item/4, remove_extra_items/3, + publish_item/7, delete_item/4, remove_extra_items/3, get_entity_affiliations/2, get_node_affiliations/1, get_affiliation/2, set_affiliation/3, get_entity_subscriptions/2, get_node_subscriptions/1, @@ -99,8 +99,9 @@ subscribe_node(Nidx, Sender, Subscriber, AccessModel, unsubscribe_node(Nidx, Sender, Subscriber, SubId) -> node_flat:unsubscribe_node(Nidx, Sender, Subscriber, SubId). -publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload) -> - node_flat:publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload). +publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload, PubOpts) -> + node_flat:publish_item(Nidx, Publisher, Model, MaxItems, ItemId, + Payload, PubOpts). remove_extra_items(Nidx, MaxItems, ItemIds) -> node_flat:remove_extra_items(Nidx, MaxItems, ItemIds). diff --git a/src/node_pep.erl b/src/node_pep.erl index 2ac4da627..504e39fa3 100644 --- a/src/node_pep.erl +++ b/src/node_pep.erl @@ -37,7 +37,7 @@ -export([init/3, terminate/2, options/0, features/0, create_node_permission/6, create_node/2, delete_node/1, purge_node/2, subscribe_node/8, unsubscribe_node/4, - publish_item/6, delete_item/4, remove_extra_items/3, + publish_item/7, delete_item/4, remove_extra_items/3, get_entity_affiliations/2, get_node_affiliations/1, get_affiliation/2, set_affiliation/3, get_entity_subscriptions/2, get_node_subscriptions/1, @@ -130,8 +130,9 @@ unsubscribe_node(Nidx, Sender, Subscriber, SubId) -> {result, _} -> {result, []} end. -publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload) -> - node_flat:publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload). +publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload, PubOpts) -> + node_flat:publish_item(Nidx, Publisher, Model, MaxItems, ItemId, + Payload, PubOpts). remove_extra_items(Nidx, MaxItems, ItemIds) -> node_flat:remove_extra_items(Nidx, MaxItems, ItemIds). diff --git a/src/node_pep_sql.erl b/src/node_pep_sql.erl index 1f2c13d5c..62e9edc03 100644 --- a/src/node_pep_sql.erl +++ b/src/node_pep_sql.erl @@ -37,7 +37,7 @@ -export([init/3, terminate/2, options/0, features/0, create_node_permission/6, create_node/2, delete_node/1, purge_node/2, subscribe_node/8, unsubscribe_node/4, - publish_item/6, delete_item/4, remove_extra_items/3, + publish_item/7, delete_item/4, remove_extra_items/3, get_entity_affiliations/2, get_node_affiliations/1, get_affiliation/2, set_affiliation/3, get_entity_subscriptions/2, get_node_subscriptions/1, @@ -86,8 +86,9 @@ unsubscribe_node(Nidx, Sender, Subscriber, SubId) -> {result, _} -> {result, []} end. -publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload) -> - node_flat_sql:publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload). +publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload, PubOpts) -> + node_flat_sql:publish_item(Nidx, Publisher, Model, MaxItems, ItemId, + Payload, PubOpts). remove_extra_items(Nidx, MaxItems, ItemIds) -> node_flat_sql:remove_extra_items(Nidx, MaxItems, ItemIds). diff --git a/src/node_private.erl b/src/node_private.erl index 79dc5ed81..0cd04b9dd 100644 --- a/src/node_private.erl +++ b/src/node_private.erl @@ -33,7 +33,7 @@ -export([init/3, terminate/2, options/0, features/0, create_node_permission/6, create_node/2, delete_node/1, purge_node/2, subscribe_node/8, unsubscribe_node/4, - publish_item/6, delete_item/4, remove_extra_items/3, + publish_item/7, delete_item/4, remove_extra_items/3, get_entity_affiliations/2, get_node_affiliations/1, get_affiliation/2, set_affiliation/3, get_entity_subscriptions/2, get_node_subscriptions/1, @@ -101,8 +101,9 @@ subscribe_node(Nidx, Sender, Subscriber, AccessModel, unsubscribe_node(Nidx, Sender, Subscriber, SubId) -> node_flat:unsubscribe_node(Nidx, Sender, Subscriber, SubId). -publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload) -> - node_flat:publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload). +publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload, PubOpts) -> + node_flat:publish_item(Nidx, Publisher, Model, MaxItems, ItemId, + Payload, PubOpts). remove_extra_items(Nidx, MaxItems, ItemIds) -> node_flat:remove_extra_items(Nidx, MaxItems, ItemIds). diff --git a/src/node_public.erl b/src/node_public.erl index cdb8abca3..0786d9995 100644 --- a/src/node_public.erl +++ b/src/node_public.erl @@ -33,7 +33,7 @@ -export([init/3, terminate/2, options/0, features/0, create_node_permission/6, create_node/2, delete_node/1, purge_node/2, subscribe_node/8, unsubscribe_node/4, - publish_item/6, delete_item/4, remove_extra_items/3, + publish_item/7, delete_item/4, remove_extra_items/3, get_entity_affiliations/2, get_node_affiliations/1, get_affiliation/2, set_affiliation/3, get_entity_subscriptions/2, get_node_subscriptions/1, @@ -101,8 +101,9 @@ subscribe_node(Nidx, Sender, Subscriber, AccessModel, unsubscribe_node(Nidx, Sender, Subscriber, SubId) -> node_flat:unsubscribe_node(Nidx, Sender, Subscriber, SubId). -publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload) -> - node_flat:publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload). +publish_item(Nidx, Publisher, Model, MaxItems, ItemId, Payload, PubOpts) -> + node_flat:publish_item(Nidx, Publisher, Model, MaxItems, ItemId, + Payload, PubOpts). remove_extra_items(Nidx, MaxItems, ItemIds) -> node_flat:remove_extra_items(Nidx, MaxItems, ItemIds).