aboutsummaryrefslogtreecommitdiff
path: root/lib/connection.cpp
diff options
context:
space:
mode:
authorKitsune Ral <Kitsune-Ral@users.sf.net>2019-03-27 19:06:34 +0900
committerKitsune Ral <Kitsune-Ral@users.sf.net>2019-03-27 19:06:34 +0900
commit0e439f23ff96a219ad7156e40294f88d44d55361 (patch)
treeb383b205c4dccf05fe88430fe0db869341ac1fef /lib/connection.cpp
parentd8147d4ad8493ae9de94aee8a222a24d000a7c96 (diff)
downloadlibquotient-0e439f23ff96a219ad7156e40294f88d44d55361.tar.gz
libquotient-0e439f23ff96a219ad7156e40294f88d44d55361.zip
Connection::domain()
Diffstat (limited to 'lib/connection.cpp')
-rw-r--r--lib/connection.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/connection.cpp b/lib/connection.cpp
index 59aca025..07c24c92 100644
--- a/lib/connection.cpp
+++ b/lib/connection.cpp
@@ -788,6 +788,11 @@ QUrl Connection::homeserver() const
return d->data->baseUrl();
}
+QString Connection::domain() const
+{
+ return d->userId.section(':', 1);
+}
+
Room* Connection::room(const QString& roomId, JoinStates states) const
{
Room* room = d->roomMap.value({roomId, false}, nullptr);