From b7179bc4c6dd3d5ea2fbf3d5904d0e7f765b0a10 Mon Sep 17 00:00:00 2001 From: Anno van Vliet <anno.van.vliet@gmail.com> Date: Thu, 25 Jan 2018 12:35:20 +0100 Subject: [PATCH] =?UTF-8?q?Group=20Chat=20History=20contains=20one=20messa?= =?UTF-8?q?ge=20to=20many.=20When=20specifying=20=E2=80=9CShow=20a=20Speci?= =?UTF-8?q?fic=20Number=20of=20Messages=E2=80=9D=20for=20Group=20Chat=20Hi?= =?UTF-8?q?story=20Settings,=20the=20user=20get=20one=20message=20to=20man?= =?UTF-8?q?y.=20For=20example,=20if=2010=20is=20specified.=20the=20user=20?= =?UTF-8?q?get=20the=20last=20eleven=20messages=20in=20the=20room.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/java/org/jivesoftware/openfire/muc/HistoryStrategy.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/java/org/jivesoftware/openfire/muc/HistoryStrategy.java b/src/java/org/jivesoftware/openfire/muc/HistoryStrategy.java index 45b17ec7b..093d68122 100644 --- a/src/java/org/jivesoftware/openfire/muc/HistoryStrategy.java +++ b/src/java/org/jivesoftware/openfire/muc/HistoryStrategy.java @@ -197,7 +197,7 @@ public class HistoryStrategy { // message because we want to preserve the room subject if // possible. Iterator<Message> historyIter = history.iterator(); - while (historyIter.hasNext() && history.size() > strategyMaxNumber) { + while (historyIter.hasNext() && history.size() >= strategyMaxNumber) { if (historyIter.next() != roomSubject) { historyIter.remove(); } -- 2.21.0