Show location descriptions in the timeline when available

This commit is contained in:
Volker Krause
2023-06-27 18:39:08 +02:00
parent e0c0b1f0e8
commit 2f65cbeb36
3 changed files with 13 additions and 0 deletions

View File

@@ -696,6 +696,9 @@ QString NeoChatRoom::eventToString(const RoomEvent &evt, Qt::TextFormat format,
}
return i18nc("[User] configured <name> widget", "configured %1 widget", e.contentJson()["name"].toString());
}
if (e.matrixType() == "org.matrix.msc3672.beacon_info"_ls) {
return e.contentJson()["description"_ls].toString();
}
return e.stateKey().isEmpty() ? i18n("updated %1 state", e.matrixType())
: i18n("updated %1 state for %2", e.matrixType(), e.stateKey().toHtmlEscaped());
},