Generate event links only using room ids

pull/1754/head
Nicolas Werner 5 months ago
parent 20f17aaa36
commit 1d252ae66f
No known key found for this signature in database
GPG Key ID: C8D75E610773F2D9
  1. 5
      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);

Loading…
Cancel
Save