summaryrefslogtreecommitdiff
path: root/louloulibs/xmpp/jid.hpp
diff options
context:
space:
mode:
authorJonas Smedegaard <dr@jones.dk>2016-12-21 21:25:09 +0100
committerJonas Smedegaard <dr@jones.dk>2016-12-21 21:25:09 +0100
commitf820d86aadb7a5473bcc0a0a3669732ab0182555 (patch)
treea6a673c444ea3df75fe0a5d53e905030c2f617ce /louloulibs/xmpp/jid.hpp
parenteda4b75b1cff83336e87da90efca9fd6b4ced2c7 (diff)
parent9634cdaba2e5d2343fcbc1f07264d55609640273 (diff)
downloadbiboumi-f820d86aadb7a5473bcc0a0a3669732ab0182555.tar.gz
biboumi-f820d86aadb7a5473bcc0a0a3669732ab0182555.tar.bz2
biboumi-f820d86aadb7a5473bcc0a0a3669732ab0182555.tar.xz
biboumi-f820d86aadb7a5473bcc0a0a3669732ab0182555.zip
New upstream version 4.0upstream/4.0
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;
}
};