mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 11:00:48 +03:00
Adapt to changes in MSC2312
This commit is contained in:
parent
b8c6c716be
commit
9f7dc5488e
1 changed files with 7 additions and 7 deletions
|
@ -1326,14 +1326,14 @@ mxidFromSegments(QStringRef sigil, QStringRef mxid)
|
||||||
|
|
||||||
auto mxid_ = QUrl::fromPercentEncoding(mxid.toUtf8());
|
auto mxid_ = QUrl::fromPercentEncoding(mxid.toUtf8());
|
||||||
|
|
||||||
if (sigil == "user") {
|
if (sigil == "u") {
|
||||||
return "@" + mxid_;
|
return "@" + mxid_;
|
||||||
} else if (sigil == "roomid") {
|
} else if (sigil == "roomid") {
|
||||||
return "!" + mxid_;
|
return "!" + mxid_;
|
||||||
} else if (sigil == "room") {
|
} else if (sigil == "r") {
|
||||||
return "#" + mxid_;
|
return "#" + mxid_;
|
||||||
} else if (sigil == "group") {
|
//} else if (sigil == "group") {
|
||||||
return "+" + mxid_;
|
// return "+" + mxid_;
|
||||||
} else {
|
} else {
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
@ -1362,7 +1362,7 @@ ChatPage::handleMatrixUri(const QByteArray &uri)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
QString mxid2;
|
QString mxid2;
|
||||||
if (segments.size() == 4 && segments[2] == "event") {
|
if (segments.size() == 4 && segments[2] == "e") {
|
||||||
if (segments[3].isEmpty())
|
if (segments[3].isEmpty())
|
||||||
return;
|
return;
|
||||||
else
|
else
|
||||||
|
@ -1383,7 +1383,7 @@ ChatPage::handleMatrixUri(const QByteArray &uri)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sigil1 == "user") {
|
if (sigil1 == "u") {
|
||||||
if (action.isEmpty()) {
|
if (action.isEmpty()) {
|
||||||
view_manager_->activeTimeline()->openUserProfile(mxid1);
|
view_manager_->activeTimeline()->openUserProfile(mxid1);
|
||||||
} else if (action == "chat") {
|
} else if (action == "chat") {
|
||||||
|
@ -1403,7 +1403,7 @@ ChatPage::handleMatrixUri(const QByteArray &uri)
|
||||||
if (action == "join") {
|
if (action == "join") {
|
||||||
joinRoomVia(targetRoomId, vias);
|
joinRoomVia(targetRoomId, vias);
|
||||||
}
|
}
|
||||||
} else if (sigil1 == "room") {
|
} else if (sigil1 == "r") {
|
||||||
auto joined_rooms = cache::joinedRooms();
|
auto joined_rooms = cache::joinedRooms();
|
||||||
auto targetRoomAlias = mxid1.toStdString();
|
auto targetRoomAlias = mxid1.toStdString();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue