diff options
author | Paweł Chmielowski <pchmielowski@process-one.net> | 2019-07-31 12:20:38 +0200 |
---|---|---|
committer | Paweł Chmielowski <pchmielowski@process-one.net> | 2019-07-31 13:06:44 +0200 |
commit | 51bf552c3f3b804af1b89218980ef1d48e892832 (patch) | |
tree | 5b9df9850a55bc42b8900052e681d048a6946e6b /src/node_pep_sql.erl | |
parent | Don't render CAPTCHA whitelist when CAPTCHA is not configured (diff) |
For pubsub items with max_item = 1 use order by in sql queries
Diffstat (limited to 'src/node_pep_sql.erl')
-rw-r--r-- | src/node_pep_sql.erl | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/node_pep_sql.erl b/src/node_pep_sql.erl index ac3ab219..6c1e642b 100644 --- a/src/node_pep_sql.erl +++ b/src/node_pep_sql.erl @@ -46,7 +46,8 @@ set_state/1, get_items/7, get_items/3, get_item/7, get_item/2, set_item/1, get_item_name/3, node_to_path/1, path_to_node/1, depends/3, - get_entity_subscriptions_for_send_last/2, get_last_items/3]). + get_entity_subscriptions_for_send_last/2, get_last_items/3, + get_only_item/2]). depends(_Host, _ServerHost, _Opts) -> [{mod_caps, hard}]. @@ -218,6 +219,9 @@ get_items(Nidx, JID, AccessModel, PresenceSubscription, RosterGroup, SubId, RSM) get_last_items(Nidx, JID, Count) -> node_flat_sql:get_last_items(Nidx, JID, Count). +get_only_item(Nidx, JID) -> + node_flat_sql:get_only_item(Nidx, JID). + get_item(Nidx, ItemId) -> node_flat_sql:get_item(Nidx, ItemId). |