From f1de6d032091bd141e12e8345969495d6f23c3e6 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Fri, 18 Sep 2015 21:58:05 +0200 Subject: Add Bridge::get_bare_jid --- src/bridge/bridge.cpp | 6 ++++++ src/bridge/bridge.hpp | 1 + 2 files changed, 7 insertions(+) diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp index 1d46e07..ba70069 100644 --- a/src/bridge/bridge.cpp +++ b/src/bridge/bridge.cpp @@ -74,6 +74,12 @@ const std::string& Bridge::get_jid() const return this->user_jid; } +std::string Bridge::get_bare_jid() const +{ + Jid jid(this->user_jid); + return jid.local + "@" + jid.domain; +} + Xmpp::body Bridge::make_xmpp_body(const std::string& str) { std::string res; diff --git a/src/bridge/bridge.hpp b/src/bridge/bridge.hpp index 72a8e90..dfe0aa7 100644 --- a/src/bridge/bridge.hpp +++ b/src/bridge/bridge.hpp @@ -47,6 +47,7 @@ public: * Return the jid of the XMPP user using this bridge */ const std::string& get_jid() const; + std::string get_bare_jid() const; static Xmpp::body make_xmpp_body(const std::string& str); /*** -- cgit v1.2.3