diff options
author | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-03-26 09:25:20 +0100 |
---|---|---|
committer | Kitsune Ral <Kitsune-Ral@users.sf.net> | 2020-03-26 09:26:25 +0100 |
commit | ef59622e3506c7d234c1fff7dea1aa921f965e25 (patch) | |
tree | 3ec8e79eef86c45e5f55c62a930420a6647ade19 /lib/room.cpp | |
parent | 89573ca2a1c19d79c1417e64613f1a0fa696837c (diff) | |
download | libquotient-ef59622e3506c7d234c1fff7dea1aa921f965e25.tar.gz libquotient-ef59622e3506c7d234c1fff7dea1aa921f965e25.zip |
Room::aliases(): don't add canonical alias if it's empty
Fixes #394.
Diffstat (limited to 'lib/room.cpp')
-rw-r--r-- | lib/room.cpp | 5 |
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 |