summary refs log tree commit diff
path: root/src/UsersModel.cpp
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2020-11-24 19:01:52 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2020-11-25 19:05:12 +0100
commitc07c3261414b537a21c0493f73d9790c36dde219 (patch)
treeca8e1e975feda027017257808aeec5f2efba4bb4 /src/UsersModel.cpp
parentMouse selection of completions (diff)
downloadnheko-c07c3261414b537a21c0493f73d9790c36dde219.tar.xz
Linkify username completion
Diffstat (limited to 'src/UsersModel.cpp')
-rw-r--r--src/UsersModel.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/UsersModel.cpp b/src/UsersModel.cpp
index cb9f8f75..aeabf467 100644
--- a/src/UsersModel.cpp
+++ b/src/UsersModel.cpp
@@ -32,6 +32,9 @@ UsersModel::data(const QModelIndex &index, int role) const
         if (hasIndex(index.row(), index.column(), index.parent())) {
                 switch (role) {
                 case CompletionModel::CompletionRole:
+                        return QString("[%1](https://matrix.to/#/%2)")
+                          .arg(displayNames[index.row()])
+                          .arg(userids[index.row()]);
                 case CompletionModel::SearchRole:
                 case Qt::DisplayRole:
                 case Roles::DisplayName: