mirror of
https://github.com/discourse/discourse.git
synced 2024-11-27 09:23:43 +08:00
FIX: composer education message for group mentions were broken (#14937)
Composer education message for group mentions were broken because the count parameter is a string instead of a number.
This commit is contained in:
parent
fc3a6e57e3
commit
8c4896f660
|
@ -675,17 +675,19 @@ export default Controller.extend({
|
|||
groups.forEach((group) => {
|
||||
let body;
|
||||
const groupLink = getURL(`/g/${group.name}/members`);
|
||||
const maxMentions = parseInt(group.max_mentions, 10);
|
||||
const userCount = parseInt(group.user_count, 10);
|
||||
|
||||
if (group.max_mentions < group.user_count) {
|
||||
if (maxMentions < userCount) {
|
||||
body = I18n.t("composer.group_mentioned_limit", {
|
||||
group: `@${group.name}`,
|
||||
count: group.max_mentions,
|
||||
count: maxMentions,
|
||||
group_link: groupLink,
|
||||
});
|
||||
} else if (group.user_count > 0) {
|
||||
body = I18n.t("composer.group_mentioned", {
|
||||
group: `@${group.name}`,
|
||||
count: group.user_count,
|
||||
count: userCount,
|
||||
group_link: groupLink,
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user