diff options
author | Nicolas Werner <nicolas.werner@hotmail.de> | 2024-06-14 14:53:27 +0200 |
---|---|---|
committer | Nicolas Werner <nicolas.werner@hotmail.de> | 2024-06-14 14:53:27 +0200 |
commit | 1d252ae66f4ccd433c9b2fe63dd15de3d5a188f3 (patch) | |
tree | 109b8a535fb4325650dfb46f700631f0a2a328c0 /src | |
parent | Fix avatar change rendering (diff) | |
download | nheko-1d252ae66f4ccd433c9b2fe63dd15de3d5a188f3.tar.xz |
Generate event links only using room ids
Diffstat (limited to 'src')
-rw-r--r-- | src/timeline/TimelineModel.cpp | 5 |
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); |