Forward ping requests from IRC to XMPP, to one single resource
This commit is contained in:
@@ -746,7 +746,10 @@ void Bridge::send_xmpp_ping_request(const std::string& nick, const std::string&
|
|||||||
// Use revstr because the forwarded ping to target XMPP user must not be
|
// Use revstr because the forwarded ping to target XMPP user must not be
|
||||||
// the same that the request iq, but we also need to get it back easily
|
// the same that the request iq, but we also need to get it back easily
|
||||||
// (revstr again)
|
// (revstr again)
|
||||||
this->xmpp.send_ping_request(nick + "!" + utils::empty_if_fixed_server(hostname), this->user_jid, utils::revstr(id));
|
// Forward to the first resource (arbitrary, based on the “order” of the std::set) only
|
||||||
|
const auto resources = this->resources_in_server[hostname];
|
||||||
|
if (resources.begin() != resources.end())
|
||||||
|
this->xmpp.send_ping_request(nick + "!" + utils::empty_if_fixed_server(hostname), this->user_jid + "/" + *resources.begin(), utils::revstr(id));
|
||||||
}
|
}
|
||||||
|
|
||||||
void Bridge::set_preferred_from_jid(const std::string& nick, const std::string& full_jid)
|
void Bridge::set_preferred_from_jid(const std::string& nick, const std::string& full_jid)
|
||||||
|
|||||||
Reference in New Issue
Block a user