mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
ui: fix markdown user search avatar preview
This commit is contained in:
1 parent
522cde28ca
commit
f6bc8db1f8
1 file changed
+1
-1
@@ -77,7 +77,7 @@ monaco.languages.registerCompletionItemProvider('markdown', {
|
|||||||
endColumn: word.endColumn,
|
endColumn: word.endColumn,
|
||||||
};
|
};
|
||||||
if (prefix === '@') {
|
if (prefix === '@') {
|
||||||
const users = await api('users', { search: word.word }, ['_id', 'uname']);
|
const users = await api('users', { search: word.word }, ['_id', 'uname', 'avatarUrl', 'priv']);
|
||||||
return {
|
return {
|
||||||
suggestions: users.map((i) => ({
|
suggestions: users.map((i) => ({
|
||||||
label: { label: `@${i.uname}`, description: `UID=${i._id}` },
|
label: { label: `@${i.uname}`, description: `UID=${i._id}` },
|
||||||
|
|||||||
Reference in new issue
Block a user