Skip to content

Commit ef80a0b

Browse files
authored
avoid negatives
1 parent 3217bec commit ef80a0b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/editor/serialize.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@ export function textSerialize(model: EditorModel) {
6262
}
6363

6464
export function containsEmote(model: EditorModel) {
65-
return startsWith(model, "/me ", true);
65+
return startsWith(model, "/me ", false);
6666
}
6767

68-
export function startsWith(model: EditorModel, prefix: string, caseInsensitive = false) {
68+
export function startsWith(model: EditorModel, prefix: string, caseSensitive = true) {
6969
const firstPart = model.parts[0];
7070
// part type will be "plain" while editing,
7171
// and "command" while composing a message.
7272
let text = firstPart && firstPart.text;
73-
if (caseInsensitive) {
73+
if (!caseSensitive) {
7474
prefix = prefix.toLowerCase();
7575
text = text.toLowerCase();
7676
}

0 commit comments

Comments
 (0)