]> granicus.if.org Git - ejabberd/commitdiff
get_items bugfix (EJAB-716)
authorChristophe Romain <christophe.romain@process-one.net>
Mon, 25 Aug 2008 22:51:17 +0000 (22:51 +0000)
committerChristophe Romain <christophe.romain@process-one.net>
Mon, 25 Aug 2008 22:51:17 +0000 (22:51 +0000)
SVN Revision: 1541

ChangeLog
src/mod_pubsub/mod_pubsub.erl

index 90d0a89dde8046a6c460b96804f2b2ca408e9b22..253cd4895e9043ca2a86c060f5944fdc3d959f04 100644 (file)
--- 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
index 8cc331f21a37dcb36f0b2598834565ee0565baf1..4d18eb95a910afe2cb5cf4f2e23b84ae0b397f6d 100644 (file)
@@ -933,7 +933,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
@@ -1692,8 +1692,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