aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/room.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/room.cpp b/lib/room.cpp
index 6ac2673e..43a42492 100644
--- a/lib/room.cpp
+++ b/lib/room.cpp
@@ -523,7 +523,10 @@ QString Room::name() const
QStringList Room::aliases() const
{
const auto* evt = d->getCurrentState<RoomCanonicalAliasEvent>();
- return QStringList(evt->altAliases()) << evt->alias();
+ auto result = evt->altAliases();
+ if (!evt->alias().isEmpty())
+ result << evt->alias();
+ return result;
}
QStringList Room::altAliases() const