diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2022-06-16 01:49:51 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2022-06-17 03:14:48 +0200 |
commit | 28acea55e2efd76dd85bba4f343a668c3015db3b (patch) | |
tree | 68f43d66ea938357d7e4649daaf5dbc661811045 /src/timeline/TimelineModel.cpp | |
parent | Translated using Weblate (Finnish) (diff) | |
download | nheko-28acea55e2efd76dd85bba4f343a668c3015db3b.tar.xz |
Remove redundant alias function
Diffstat (limited to '')
-rw-r--r-- | src/timeline/TimelineModel.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp index 2151a4ae..8e9a21db 100644 --- a/src/timeline/TimelineModel.cpp +++ b/src/timeline/TimelineModel.cpp @@ -1761,12 +1761,13 @@ TimelineModel::copyLinkToEvent(const QString &eventId) const { QStringList vias; - auto alias = cache::client()->getRoomAliases(room_id_.toStdString()); + auto alias = + cache::client()->getStateEvent<mtx::events::state::CanonicalAlias>(room_id_.toStdString()); QString room; if (alias) { - room = QString::fromStdString(alias->alias); - if (room.isEmpty() && !alias->alt_aliases.empty()) { - room = QString::fromStdString(alias->alt_aliases.front()); + room = QString::fromStdString(alias->content.alias); + if (room.isEmpty() && !alias->content.alt_aliases.empty()) { + room = QString::fromStdString(alias->content.alt_aliases.front()); } } |