summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog1
-rw-r--r--src/mod_pubsub/mod_pubsub.erl2
2 files changed, 2 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 0dad41ac..d8fa25c1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
* src/mod_pubsub/mod_pubsub.erl: prevent publish items with invalid
XML schema bugfix (EJAB-699) (previous commit was uncomplete)
+ and fix bug injected in previous commit
2008-12-08 Christophe Romain <christophe.romain@process-one.net>
diff --git a/src/mod_pubsub/mod_pubsub.erl b/src/mod_pubsub/mod_pubsub.erl
index 23f6d619..5e0f1423 100644
--- a/src/mod_pubsub/mod_pubsub.erl
+++ b/src/mod_pubsub/mod_pubsub.erl
@@ -1763,7 +1763,7 @@ send_items(Host, Node, LJID, Number) ->
[];
Items ->
case Number of
- last -> lists:last(Items);
+ last -> [lists:last(Items)];
all -> Items;
N when N > 0 -> lists:nthtail(length(Items)-N, Items);
_ -> Items