mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 03:00:46 +03:00
Generate event links only using room ids
This commit is contained in:
parent
20f17aaa36
commit
1d252ae66f
1 changed files with 3 additions and 2 deletions
|
@ -2246,8 +2246,9 @@ TimelineModel::getRoomVias(const QString &roomId)
|
||||||
void
|
void
|
||||||
TimelineModel::copyLinkToEvent(const QString &eventId) const
|
TimelineModel::copyLinkToEvent(const QString &eventId) const
|
||||||
{
|
{
|
||||||
auto link = QStringLiteral("%1/%2?%3")
|
// Event links shouldn't use an alias, since that can be repointed.
|
||||||
.arg(getBareRoomLink(room_id_),
|
auto link = QStringLiteral("https://matrix.to/#/%1/%2?%3")
|
||||||
|
.arg(QUrl::toPercentEncoding(room_id_),
|
||||||
QString(QUrl::toPercentEncoding(eventId)),
|
QString(QUrl::toPercentEncoding(eventId)),
|
||||||
getRoomVias(room_id_));
|
getRoomVias(room_id_));
|
||||||
QGuiApplication::clipboard()->setText(link);
|
QGuiApplication::clipboard()->setText(link);
|
||||||
|
|
Loading…
Reference in a new issue