show forward menu item only for relevant events, changes to ui

This commit is contained in:
targetakhil 2021-04-15 21:14:58 +05:30
parent ce8246238e
commit 6893e3a8d5
4 changed files with 32 additions and 7 deletions

View file

@ -832,6 +832,17 @@ TimelineModel::forwardMessage(QString eventId, QString roomId)
emit forwardToRoom(e, roomId, cache::isRoomEncrypted(room_id_.toStdString()));
}
QString
TimelineModel::messageContent(QString eventId)
{
auto e = events.get(eventId.toStdString(), "");
if (!e)
return "";
auto content = mtx::accessors::body(*e);
return QString::fromStdString(content);
}
void
TimelineModel::viewDecryptedRawMessage(QString id) const
{