feat: add a quick reply workflow using the Ctrl+Up arrow key

neochat now supports a quick reply shortcut, which helps to reply to
the last event in a room.
This commit is contained in:
Srevin Saju
2021-04-04 21:50:30 +03:00
committed by Carl Schwan
parent e4ab2e565f
commit 78f7f815ca
7 changed files with 67 additions and 1 deletions

View File

@@ -265,6 +265,17 @@ QVariantList NeoChatRoom::getUsers(const QString &keyword) const
return matchedList;
}
QVariantMap NeoChatRoom::getUser(const QString& userID) const
{
NeoChatUser user(userID, connection());
return QVariantMap {
{ QStringLiteral("id"), user.id() },
{ QStringLiteral("displayName"), user.displayname(this) },
{ QStringLiteral("avatarMediaId"), user.avatarMediaId(this) },
{ QStringLiteral("color"), user.color() }
};
}
QUrl NeoChatRoom::urlToMxcUrl(const QUrl &mxcUrl)
{
return DownloadFileJob::makeRequestUrl(connection()->homeserver(), mxcUrl);