aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--src/mod_pubsub/mod_pubsub.erl6
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 80d2478a0..56963eb70 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-08-26 Christophe Romain <christophe.romain@process-one.net>
+
+ * src/mod_pubsub/mod_pubsub.erl: get_items bugfix (EJAB-716)
+
2008-08-25 Christophe Romain <christophe.romain@process-one.net>
* src/mod_privacy_odbc.erl: Prevent case_clause error when
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