Commit 7a63ea9e authored by Sebastian Krzyszkowiak's avatar Sebastian Krzyszkowiak Committed by vitalyster

libtransport: set active chat state on conversation message

Not setting it violated XEP-0085 and sometimes tricked other clients
into thinking that Spectrum does not understand chat states.

Closes #282
parent d11fdaf3
......@@ -694,6 +694,8 @@ void NetworkPluginServer::handleConvMessagePayload(const std::string &data, bool
msg->setType(Swift::Message::Headline);
}
msg->addPayload(SWIFTEN_SHRPTR_NAMESPACE::make_shared<Swift::ChatState>(Swift::ChatState::Active));
// Add xhtml-im payload.
if (CONFIG_BOOL(m_config, "service.enable_xhtml") && !payload.xhtml().empty()) {
msg->addPayload(SWIFTEN_SHRPTR_NAMESPACE::make_shared<Swift::XHTMLIMPayload>(payload.xhtml()));
......
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