diff --git a/src/editor/parts.ts b/src/editor/parts.ts index 000080a09c5..415ee167bbe 100644 --- a/src/editor/parts.ts +++ b/src/editor/parts.ts @@ -651,10 +651,10 @@ export class PartCreator { userId: string, ): [UserPillPart, PlainPart] { const pill = this.userPill(displayName, userId); - const postfix = this.plain( - insertTrailingCharacter && - (SettingsStore.getValue("MessageComposerInput.insertTrailingComma") ? ": " : " "), - ); + if (!SettingsStore.getValue("MessageComposerInput.insertTrailingComma")) { + insertTrailingCharacter = false; + } + const postfix = this.plain(insertTrailingCharacter ? ": " : " "); return [pill, postfix]; } }