summaryrefslogtreecommitdiff
path: root/louloulibs/xmpp/jid.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'louloulibs/xmpp/jid.hpp')
-rw-r--r--louloulibs/xmpp/jid.hpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/louloulibs/xmpp/jid.hpp b/louloulibs/xmpp/jid.hpp
index 08327ef..85e835c 100644
--- a/louloulibs/xmpp/jid.hpp
+++ b/louloulibs/xmpp/jid.hpp
@@ -26,7 +26,12 @@ public:
}
std::string full() const
{
- return this->local + "@" + this->domain + "/" + this->resource;
+ std::string res = this->domain;
+ if (!this->local.empty())
+ res = this->local + "@" + this->domain;
+ if (!this->resource.empty())
+ res += "/" + this->resource;
+ return res;
}
};