summaryrefslogtreecommitdiff
path: root/src/xmpp/biboumi_component.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmpp/biboumi_component.cpp')
-rw-r--r--src/xmpp/biboumi_component.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/xmpp/biboumi_component.cpp b/src/xmpp/biboumi_component.cpp
index 5b1d0e0..94d85c6 100644
--- a/src/xmpp/biboumi_component.cpp
+++ b/src/xmpp/biboumi_component.cpp
@@ -507,22 +507,24 @@ void BiboumiComponent::handle_iq(const Stanza& stanza)
Bridge* BiboumiComponent::get_user_bridge(const std::string& user_jid)
{
+ auto bare_jid = Jid{user_jid}.bare();
try
{
- return this->bridges.at(user_jid).get();
+ return this->bridges.at(bare_jid).get();
}
catch (const std::out_of_range& exception)
{
- this->bridges.emplace(user_jid, std::make_unique<Bridge>(user_jid, *this, this->poller));
- return this->bridges.at(user_jid).get();
+ this->bridges.emplace(bare_jid, std::make_unique<Bridge>(bare_jid, *this, this->poller));
+ return this->bridges.at(bare_jid).get();
}
}
Bridge* BiboumiComponent::find_user_bridge(const std::string& user_jid)
{
+ auto bare_jid = Jid{user_jid}.bare();
try
{
- return this->bridges.at(user_jid).get();
+ return this->bridges.at(bare_jid).get();
}
catch (const std::out_of_range& exception)
{