summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2024-06-14 14:53:27 +0200
committerNicolas Werner <nicolas.werner@hotmail.de>2024-06-14 14:53:27 +0200
commit1d252ae66f4ccd433c9b2fe63dd15de3d5a188f3 (patch)
tree109b8a535fb4325650dfb46f700631f0a2a328c0 /src
parentFix avatar change rendering (diff)
downloadnheko-1d252ae66f4ccd433c9b2fe63dd15de3d5a188f3.tar.xz
Generate event links only using room ids
Diffstat (limited to 'src')
-rw-r--r--src/timeline/TimelineModel.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/timeline/TimelineModel.cpp b/src/timeline/TimelineModel.cpp
index 4b74b3bd..48b58ee5 100644
--- a/src/timeline/TimelineModel.cpp
+++ b/src/timeline/TimelineModel.cpp
@@ -2246,8 +2246,9 @@ TimelineModel::getRoomVias(const QString &roomId)
 void
 TimelineModel::copyLinkToEvent(const QString &eventId) const
 {
-    auto link = QStringLiteral("%1/%2?%3")
-                  .arg(getBareRoomLink(room_id_),
+    // Event links shouldn't use an alias, since that can be repointed.
+    auto link = QStringLiteral("https://matrix.to/#/%1/%2?%3")
+                  .arg(QUrl::toPercentEncoding(room_id_),
                        QString(QUrl::toPercentEncoding(eventId)),
                        getRoomVias(room_id_));
     QGuiApplication::clipboard()->setText(link);