#include "EventTypes/SMS.h"
#include "Factory.h"
#include "Settings.h"
+#include "VBody.h"
#include "VCard.h"
#include "VEnvelope.h"
-#include "VBody.h"
#include <QDateTime>
#include <QTextStream>
{
}
-bool VMessage::Read(const QString & initialLine, QTextStream & stream, EventTypes::SMS & event)
+bool VMessage::Read(const QString &initialLine, QTextStream &stream, EventTypes::SMS &event)
{
if(getParent() != NULL)
{
{
QString box = lineData.mid(lineData.indexOf(":") + 1);
bool isOutgoing(box == "SENT");
+
+ // Early out once we know we're not processing this type of message
+ if((!isOutgoing && !CurrentSettings().ShouldProcess(Settings::INCOMING, EventTypes::EVENT_TYPE_SMS))
+ || isOutgoing && !CurrentSettings().ShouldProcess(Settings::OUTGOING, EventTypes::EVENT_TYPE_SMS))
+ {
+ return false;
+ }
+
if (isOutgoing == false && box != "INBOX")
{
qDebug() << "Unexpected box: " << box;