summaryrefslogtreecommitdiff
path: root/louloulibs/xmpp/jid.hpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2016-08-25 19:43:51 +0200
committerlouiz’ <louiz@louiz.org>2016-08-28 22:42:50 +0200
commit7536a1b3f38fbf093c1629b0db209754ada0c906 (patch)
tree6d5f8f9d8ba3aa7274b75cc733dabdd89f20f29d /louloulibs/xmpp/jid.hpp
parentb59fc2a834dccb35f12dcfec624b6181e4e2fbe9 (diff)
downloadbiboumi-7536a1b3f38fbf093c1629b0db209754ada0c906.tar.gz
biboumi-7536a1b3f38fbf093c1629b0db209754ada0c906.tar.bz2
biboumi-7536a1b3f38fbf093c1629b0db209754ada0c906.tar.xz
biboumi-7536a1b3f38fbf093c1629b0db209754ada0c906.zip
Respond to MAM requests on a channel JID
At the moment, result-set-management is not implemented, the whole history (well, at most 1024 messages) is returned.
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;
}
};