From 1d252ae66f4ccd433c9b2fe63dd15de3d5a188f3 Mon Sep 17 00:00:00 2001 From: Nicolas Werner Date: Fri, 14 Jun 2024 14:53:27 +0200 Subject: Generate event links only using room ids --- src/timeline/TimelineModel.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') 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); -- cgit 1.4.1