diff options
author | Christophe Romain <christophe.romain@process-one.net> | 2008-08-25 22:54:48 +0000 |
---|---|---|
committer | Christophe Romain <christophe.romain@process-one.net> | 2008-08-25 22:54:48 +0000 |
commit | 0832ad392d9a29ab9e3aacae175f843476e05d81 (patch) | |
tree | 6c973813821e3c7d9fbf9909d5afc9fe59045a8b /src | |
parent | Prevent case_clause error when ejabber_odbc:sql_query returns {error, Reason} (diff) |
get_items bugfix (EJAB-716)
SVN Revision: 1542
Diffstat (limited to 'src')
-rw-r--r-- | src/mod_pubsub/mod_pubsub.erl | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mod_pubsub/mod_pubsub.erl b/src/mod_pubsub/mod_pubsub.erl index 24d831e49..87acd9c7c 100644 --- a/src/mod_pubsub/mod_pubsub.erl +++ b/src/mod_pubsub/mod_pubsub.erl @@ -932,7 +932,7 @@ iq_pubsub(Host, ServerHost, From, IQType, SubEl, _Lang, Access, Plugins) -> ({xmlelement, "item", ItemAttrs, _}, Acc) -> case xml:get_attr_s("id", ItemAttrs) of "" -> Acc; - ItemID -> ItemID + ItemID -> [ItemID|Acc] end; (_, Acc) -> Acc @@ -1691,8 +1691,8 @@ get_items(Host, Node, From, SubId, SMaxItems, ItemIDs) -> [] -> Items; _ -> - lists:filter(fun(Item) -> - lists:member(Item, ItemIDs) + lists:filter(fun(#pubsub_item{itemid = {ItemId, _}}) -> + lists:member(ItemId, ItemIDs) end, Items) end, %% Generate the XML response (Item list), limiting the |