From 78971f168f6212853956b0e8f0db3135ca4bef90 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Fri, 14 Jun 2019 18:25:43 +0200 Subject: [PATCH] create AtRoomPill when autocomplete returns @room --- src/editor/autocomplete.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/editor/autocomplete.js b/src/editor/autocomplete.js index 4d35904976..2aedf8d7f5 100644 --- a/src/editor/autocomplete.js +++ b/src/editor/autocomplete.js @@ -95,7 +95,11 @@ export default class AutocompleteWrapperModel { const firstChr = completionId && completionId[0]; switch (firstChr) { case "@": { - return this._partCreator.userPill(text, completionId); + if (completionId === "@room") { + return this._partCreator.atRoomPill(completionId); + } else { + return this._partCreator.userPill(text, completionId); + } } case "#": return this._partCreator.roomPill(completionId);