Linkify username completion

This commit is contained in:
Nicolas Werner 2020-11-24 19:01:52 +01:00
parent 0cf556fa20
commit c07c326141
1 changed files with 3 additions and 0 deletions

View File

@ -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: