add suffixes from provider to room and @room completions

this prevents the @room not working when not typing an extra space
This commit is contained in:
Bruno Windels 2019-09-23 14:40:41 +02:00
parent 228905bec2
commit 40f7fa8f94

View File

@ -102,9 +102,9 @@ export default class AutocompleteWrapperModel {
const text = completion.completion;
switch (completion.type) {
case "room":
return [this._partCreator.roomPill(completionId)];
return [this._partCreator.roomPill(completionId), this._partCreator.plain(completion.suffix)];
case "at-room":
return [this._partCreator.atRoomPill(completionId)];
return [this._partCreator.atRoomPill(completionId), this._partCreator.plain(completion.suffix)];
case "user":
// not using suffix here, because we also need to calculate
// the suffix when clicking a display name to insert a mention,