Changeset - 829c94f3d6c9
[Not reviewed]
0 3 0
HanzZ - 13 years ago 2012-07-31 16:48:31
hanzz.k@gmail.com
Added way to disable xhtmlim from backend and don't handle messages with empty body
3 files changed with 6 insertions and 1 deletions:
0 comments (0 inline, 0 general)
src/config.cpp
Show inline comments
 
@@ -91,6 +91,7 @@ bool Config::load(std::istream &ifs, boost::program_options::options_description
 
		("service.memory_collector_time", value<int>()->default_value(0), "Time in seconds after which backend with most memory is set to die.")
 
		("service.more_resources", value<bool>()->default_value(false), "Allow more resources to be connected in server mode at the same time.")
 
		("service.enable_privacy_lists", value<bool>()->default_value(true), "")
 
		("service.enable_xhtml", value<bool>()->default_value(true), "")
 
		("vhosts.vhost", value<std::vector<std::string> >()->multitoken(), "")
 
		("identity.name", value<std::string>()->default_value("Spectrum 2 Transport"), "Name showed in service discovery.")
 
		("identity.category", value<std::string>()->default_value("gateway"), "Disco#info identity category. 'gateway' by default.")
src/networkpluginserver.cpp
Show inline comments
 
@@ -577,7 +577,7 @@ void NetworkPluginServer::handleConvMessagePayload(const std::string &data, bool
 
	}
 

	
 
	// Add xhtml-im payload.
 
	if (!payload.xhtml().empty()) {
 
	if (CONFIG_BOOL(m_config, "service.enabled_xhtml") && !payload.xhtml().empty()) {
 
		msg->addPayload(boost::make_shared<Swift::XHTMLIMPayload>(payload.xhtml()));
 
	}
 

	
src/usermanager.cpp
Show inline comments
 
@@ -312,6 +312,10 @@ void UserManager::handleMessageReceived(Swift::Message::ref message) {
 
		return;
 
	}
 

	
 
	if (message->getBody().empty()) {
 
		return;
 
	}
 

	
 
	User *user = getUser(message->getFrom().toBare().toString());
 
	if (!user){
 
		return;
0 comments (0 inline, 0 general)