Commit dabc48b7 authored by louiz’'s avatar louiz’

Mark messages from the IRC server as private and no-copy

fix #3284
parent 98227db6
......@@ -934,9 +934,9 @@ void Bridge::send_xmpp_message(const std::string& from, const std::string& autho
for (const auto& resource: this->resources_in_server[from])
{
if (Config::get("fixed_irc_server", "").empty())
this->xmpp.send_message(from, this->make_xmpp_body(body, encoding), this->user_jid + "/" + resource, "chat", false, false);
this->xmpp.send_message(from, this->make_xmpp_body(body, encoding), this->user_jid + "/" + resource, "chat", false, true);
else
this->xmpp.send_message("", this->make_xmpp_body(body, encoding), this->user_jid + "/" + resource, "chat", false, false);
this->xmpp.send_message("", this->make_xmpp_body(body, encoding), this->user_jid + "/" + resource, "chat", false, true);
}
}
......
......@@ -413,7 +413,11 @@ def connection_begin_sequence(irc_host, jid, expected_irc_presence=False, fixed_
xpath_re = "/message[@to='" + jid + "'][@from='" + irc_host + "@biboumi.localhost']/body[re:test(text(), '%s')]"
result = (
partial(expect_stanza,
xpath % ('Connecting to %s:6697 (encrypted)' % irc_host)),
(xpath % ('Connecting to %s:6697 (encrypted)' % irc_host),
"/message/hints:no-copy",
"/message/carbon:private"
)
),
partial(expect_stanza,
xpath % 'Connection failed: Connection refused'),
partial(expect_stanza,
......@@ -455,7 +459,11 @@ def connection_tls_begin_sequence(irc_host, jid, fixed_irc_server):
irc_host = 'irc.localhost'
return (
partial(expect_stanza,
xpath % ('Connecting to %s:7778 (encrypted)' % irc_host)),
(xpath % ('Connecting to %s:7778 (encrypted)' % irc_host),
"/message/hints:no-copy",
"/message/carbon:private",
)
),
partial(expect_stanza,
xpath % 'Connected to IRC server (encrypted).'),
# These five messages can be receive in any order
......
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