Commit 3621458d authored by Jonas Schäfer's avatar Jonas Schäfer Committed by louiz’

Do not send the IRC host directly as real JID of the user

Fixes #3381
parent c6749ecc
Pipeline #1843 passed with stages
in 8 minutes
......@@ -973,8 +973,17 @@ void Bridge::send_user_join(const std::string& hostname, const std::string& chan
std::string encoded_chan_name(chan_name);
xep0106::encode(encoded_chan_name);
this->xmpp.send_user_join(encoded_chan_name + utils::empty_if_fixed_server("%" + hostname), user->nick, user->host,
affiliation, role, this->user_jid + "/" + resource, self);
std::string encoded_nick_name(user->nick);
xep0106::encode(encoded_nick_name);
std::string full_jid =
encoded_nick_name + utils::empty_if_fixed_server("%" + hostname)
+ "@" + this->xmpp.get_served_hostname()
+ "/" + user->host;
this->xmpp.send_user_join(encoded_chan_name + utils::empty_if_fixed_server("%" + hostname),
user->nick, full_jid, affiliation, role,
this->user_jid + "/" + resource, self);
}
void Bridge::send_topic(const std::string& hostname, const std::string& chan_name, const std::string& topic,
......
This diff is collapsed.
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