Include a private and no-copy nodes in private <message/> to avoid carbon duplication

This commit is contained in:
louiz’
2016-10-11 00:43:46 +02:00
parent 548e4ad473
commit dfc0793ef2
3 changed files with 19 additions and 7 deletions
+3 -3
View File
@@ -771,13 +771,13 @@ void Bridge::send_message(const Iid& iid, const std::string& nick, const std::st
const auto chan_name = Iid(Jid(it->second).local, {}).get_local();
for (const auto& resource: this->resources_in_chan[ChannelKey{chan_name, iid.get_server()}])
this->xmpp.send_message(it->second, this->make_xmpp_body(body, encoding),
this->user_jid + "/" + resource, "chat", true);
this->user_jid + "/" + resource, "chat", true, true);
}
else
{
for (const auto& resource: this->resources_in_server[iid.get_server()])
this->xmpp.send_message(std::to_string(iid), this->make_xmpp_body(body, encoding),
this->user_jid + "/" + resource, "chat", false);
this->user_jid + "/" + resource, "chat", false, true);
}
}
}
@@ -835,7 +835,7 @@ void Bridge::send_xmpp_message(const std::string& from, const std::string& autho
const auto encoding = in_encoding_for(*this, {from, this});
for (const auto& resource: this->resources_in_server[from])
{
this->xmpp.send_message(from, this->make_xmpp_body(body, encoding), this->user_jid + "/" + resource, "chat");
this->xmpp.send_message(from, this->make_xmpp_body(body, encoding), this->user_jid + "/" + resource, "chat", false, false);
}
}