itr->second->setActive(false);
collection.erase(id);
return true;
- } else {
- LoggerE("Removing callback which does not belong to the current context is not allowed.");
- throw common::NotFoundException(
- "Removing callback which does not belong to the current context is not allowed.");
}
return false;
}
folderId: folderId || null,
type: type,
timestamp: timestamp || null,
- from: from || '',
+ from: from,
to: to || [],
cc: cc || [],
bcc: bcc || [],
return _internal.timestamp ? new Date(_internal.timestamp) : _internal.timestamp;
},
set: function (value) {
- if (value instanceof InternalValues_) value = value.timestamp;
- _internal.timestamp = value;
+ if (value instanceof InternalValues_) {
+ _internal.timestamp = value.timestamp;
+ }
},
enumerable: true
}
this.conversationId = data.conversationId || null;
this.folderId = data.folderId || null;
this.timestamp = data.timestamp || null;
- this.from = data.from || null;
+ this.from = data.from || '';
this.to = data.to || [];
this.cc = data.cc || [];
this.bcc = data.bcc || [];
o[MESSAGE_ATTRIBUTE_FROM] =
message->is_from_set()
? picojson::value(message->getFrom())
- : picojson::value();
+ : picojson::value(std::string(""));
std::vector<std::string> to = message->getTO();
for_each(to.begin(), to.end(), vectorToArray);
array.push_back(picojson::value(s));
};
+ std::vector<std::string> to = conversation->getTo();
+ for_each(to.begin(), to.end(), vectorToArray);
+ o[MESSAGE_ATTRIBUTE_TO] = picojson::value(array);
+ array.clear();
+
switch (conversation->getType()) {
case MessageType::SMS:
break;
case MessageType::EMAIL:
o[MESSAGE_ATTRIBUTE_SUBJECT] = picojson::value(conversation->getSubject());
- std::vector<std::string> to = conversation->getTo();
- for_each(to.begin(), to.end(), vectorToArray);
- o[MESSAGE_ATTRIBUTE_TO] = picojson::value(array);
- array.clear();
-
std::vector<std::string> cc = conversation->getCC();
for_each(cc.begin(), cc.end(), vectorToArray);
o[MESSAGE_ATTRIBUTE_CC] = picojson::value(array);