From ef59622e3506c7d234c1fff7dea1aa921f965e25 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Thu, 26 Mar 2020 09:25:20 +0100 Subject: Room::aliases(): don't add canonical alias if it's empty Fixes #394. --- lib/room.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib/room.cpp') 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(); - return QStringList(evt->altAliases()) << evt->alias(); + auto result = evt->altAliases(); + if (!evt->alias().isEmpty()) + result << evt->alias(); + return result; } QStringList Room::altAliases() const -- cgit v1.2.3