summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-07-03 16:06:52 +0200
committerlouiz’ <louiz@louiz.org>2016-07-04 18:49:00 +0200
commit03feb403f8fc702481f4e7a0ec0264aa2912ae51 (patch)
treee29540f7c0f7cbcde2686e2ee660ad50ad7b977c
parent81f8f45b371d1a0ef72c2768fbd1f9188fe83616 (diff)
downloadbiboumi-03feb403f8fc702481f4e7a0ec0264aa2912ae51.tar.gz
biboumi-03feb403f8fc702481f4e7a0ec0264aa2912ae51.tar.bz2
biboumi-03feb403f8fc702481f4e7a0ec0264aa2912ae51.tar.xz
biboumi-03feb403f8fc702481f4e7a0ec0264aa2912ae51.zip
Send the iq requests to one random resource instead of the bare JID
-rw-r--r--src/bridge/bridge.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp
index 1ca611a..edf1700 100644
--- a/src/bridge/bridge.cpp
+++ b/src/bridge/bridge.cpp
@@ -739,7 +739,9 @@ void Bridge::send_affiliation_role_change(const Iid& iid, const std::string& tar
void Bridge::send_iq_version_request(const std::string& nick, const std::string& hostname)
{
- this->xmpp.send_iq_version_request(nick + "!" + utils::empty_if_fixed_server(hostname), this->user_jid);
+ const auto resources = this->resources_in_server[hostname];
+ if (resources.begin() != resources.end())
+ this->xmpp.send_iq_version_request(nick + "!" + utils::empty_if_fixed_server(hostname), this->user_jid + "/" + *resources.begin());
}
void Bridge::send_xmpp_ping_request(const std::string& nick, const std::string& hostname,