diff options
author | Jonas Schäfer <j.wielicki@sotecware.net> | 2018-10-02 16:23:26 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2018-10-04 20:16:17 +0200 |
commit | 3621458d3f5eb369106abb5f3555e2097f461e63 (patch) | |
tree | 7e75e604fa588fed5da6142c18d5ddaca2d11cf6 /src/bridge | |
parent | c6749ecce068f1d97d04ff5588f9272275373ecb (diff) | |
download | biboumi-3621458d3f5eb369106abb5f3555e2097f461e63.tar.gz biboumi-3621458d3f5eb369106abb5f3555e2097f461e63.tar.bz2 biboumi-3621458d3f5eb369106abb5f3555e2097f461e63.tar.xz biboumi-3621458d3f5eb369106abb5f3555e2097f461e63.zip |
Do not send the IRC host directly as real JID of the userrefactor-resources
Fixes #3381
Diffstat (limited to 'src/bridge')
-rw-r--r-- | src/bridge/bridge.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp index cc2ef66..65a345e 100644 --- a/src/bridge/bridge.cpp +++ b/src/bridge/bridge.cpp @@ -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, |