FIX: If a group is unmentionable, don't render it as mentionable

Now if a group is visible but unmentionable, users can search for it
when composing by typing with `@`, but it will be rendered without the
grey background color.

It will also no longer pop up a JIT warning saying "You are about to
mention X people" because the group will not be mentioned.
This commit is contained in:
Robin Ward
2020-02-14 12:27:46 -05:00
parent c31039d51f
commit d51107e2c9
5 changed files with 28 additions and 10 deletions

View File

@ -55,7 +55,7 @@ QUnit.test("linkSeenMentions replaces users and groups", async assert => {
});
assert.equal($("a", $root)[0].text, "@valid_user");
assert.equal($("a", $root)[1].text, "@mentionable_group");
assert.equal($("a", $root)[1].text, "@valid_group");
assert.equal($("a.notify", $root).text(), "@mentionable_group");
assert.equal($("span.mention", $root)[0].innerHTML, "@invalid");
assert.equal($("span.mention", $root)[1].innerHTML, "@valid_group");
});