Commit fc682b88 authored by Anno van Vliet's avatar Anno van Vliet

Group Chat History contains one message to many.

When specifying “Show a Specific Number of Messages” for Group Chat
History Settings, the user get one message to many. For example, if 10
is specified. the user get the last eleven messages in the room.
parent 957541b4
...@@ -197,7 +197,7 @@ public class HistoryStrategy { ...@@ -197,7 +197,7 @@ public class HistoryStrategy {
// message because we want to preserve the room subject if // message because we want to preserve the room subject if
// possible. // possible.
Iterator<Message> historyIter = history.iterator(); Iterator<Message> historyIter = history.iterator();
while (historyIter.hasNext() && history.size() > strategyMaxNumber) { while (historyIter.hasNext() && history.size() >= strategyMaxNumber) {
if (historyIter.next() != roomSubject) { if (historyIter.next() != roomSubject) {
historyIter.remove(); historyIter.remove();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment