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) => {
|
groups.forEach((group) => {
|
||||||
let body;
|
let body;
|
||||||
const groupLink = getURL(`/g/${group.name}/members`);
|
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", {
|
body = I18n.t("composer.group_mentioned_limit", {
|
||||||
group: `@${group.name}`,
|
group: `@${group.name}`,
|
||||||
count: group.max_mentions,
|
count: maxMentions,
|
||||||
group_link: groupLink,
|
group_link: groupLink,
|
||||||
});
|
});
|
||||||
} else if (group.user_count > 0) {
|
} else if (group.user_count > 0) {
|
||||||
body = I18n.t("composer.group_mentioned", {
|
body = I18n.t("composer.group_mentioned", {
|
||||||
group: `@${group.name}`,
|
group: `@${group.name}`,
|
||||||
count: group.user_count,
|
count: userCount,
|
||||||
group_link: groupLink,
|
group_link: groupLink,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue