Commit 267f2e02 authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Skip messages with no body and no subject.

git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@2899 b35dd754-fafc-0310-a699-88a17e54d16e
parent c1aa0d22
/** /**
* $RCSfile$ * $RCSfile: HistoryRequest.java,v $
* $Revision$ * $Revision$
* $Date$ * $Date$
* *
...@@ -156,6 +156,10 @@ public class HistoryRequest { ...@@ -156,6 +156,10 @@ public class HistoryRequest {
message = (Message)iterator.previous(); message = (Message)iterator.previous();
// Update number of characters to send // Update number of characters to send
String text = message.getBody() == null ? message.getSubject() : message.getBody(); String text = message.getBody() == null ? message.getSubject() : message.getBody();
if (text == null) {
// Skip this message since it has no body and no subject
continue;
}
accumulatedChars += text.length(); accumulatedChars += text.length();
if (getMaxChars() > -1 && accumulatedChars > getMaxChars()) { if (getMaxChars() > -1 && accumulatedChars > getMaxChars()) {
// Stop collecting history since we have exceded a limit // Stop collecting history since we have exceded a limit
......
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