diff --git a/packages/rocketchat-api/server/v1/groups.js b/packages/rocketchat-api/server/v1/groups.js
index 73fa7d3cc1133..ffeb3cf4434a3 100644
--- a/packages/rocketchat-api/server/v1/groups.js
+++ b/packages/rocketchat-api/server/v1/groups.js
@@ -348,16 +348,24 @@ RocketChat.API.v1.addRoute('groups.info', { authRequired: true }, {
RocketChat.API.v1.addRoute('groups.invite', { authRequired: true }, {
post() {
- const findResult = findPrivateGroupByIdOrName({ params: this.requestParams(), userId: this.userId });
+ const { roomId = '', roomName = '' } = this.requestParams();
+ const idOrName = roomId || roomName;
+ if (!idOrName.trim()) {
+ throw new Meteor.Error('error-room-param-not-provided', 'The parameter "roomId" or "roomName" is required');
+ }
- const user = this.getUserFromParams();
+ const { _id: rid, t: type } = RocketChat.models.Rooms.findOneByIdOrName(idOrName) || {};
- Meteor.runAsUser(this.userId, () => {
- Meteor.call('addUserToRoom', { rid: findResult.rid, username: user.username });
- });
+ if (!rid || type !== 'p') {
+ throw new Meteor.Error('error-room-not-found', 'The required "roomId" or "roomName" param provided does not match any group');
+ }
+
+ const { username } = this.getUserFromParams();
+
+ Meteor.runAsUser(this.userId, () => Meteor.call('addUserToRoom', { rid, username }));
return RocketChat.API.v1.success({
- group: RocketChat.models.Rooms.findOneById(findResult.rid, { fields: RocketChat.API.v1.defaultFieldsToExclude })
+ group: RocketChat.models.Rooms.findOneById(rid, { fields: RocketChat.API.v1.defaultFieldsToExclude })
});
}
});
diff --git a/packages/rocketchat-assets/server/assets.js b/packages/rocketchat-assets/server/assets.js
index 297efb79ea473..9d2892b1586b8 100644
--- a/packages/rocketchat-assets/server/assets.js
+++ b/packages/rocketchat-assets/server/assets.js
@@ -396,7 +396,7 @@ Meteor.methods({
const hasPermission = RocketChat.authz.hasPermission(Meteor.userId(), 'manage-assets');
if (!hasPermission) {
- throw new Meteor.Error('error-action-now-allowed', 'Managing assets not allowed', {
+ throw new Meteor.Error('error-action-not-allowed', 'Managing assets not allowed', {
method: 'refreshClients',
action: 'Managing_assets'
});
@@ -414,7 +414,7 @@ Meteor.methods({
const hasPermission = RocketChat.authz.hasPermission(Meteor.userId(), 'manage-assets');
if (!hasPermission) {
- throw new Meteor.Error('error-action-now-allowed', 'Managing assets not allowed', {
+ throw new Meteor.Error('error-action-not-allowed', 'Managing assets not allowed', {
method: 'unsetAsset',
action: 'Managing_assets'
});
@@ -432,7 +432,7 @@ Meteor.methods({
const hasPermission = RocketChat.authz.hasPermission(Meteor.userId(), 'manage-assets');
if (!hasPermission) {
- throw new Meteor.Error('error-action-now-allowed', 'Managing assets not allowed', {
+ throw new Meteor.Error('error-action-not-allowed', 'Managing assets not allowed', {
method: 'setAsset',
action: 'Managing_assets'
});
diff --git a/packages/rocketchat-autotranslate/server/methods/getSupportedLanguages.js b/packages/rocketchat-autotranslate/server/methods/getSupportedLanguages.js
index 841a30268f854..e312e6ed51cae 100644
--- a/packages/rocketchat-autotranslate/server/methods/getSupportedLanguages.js
+++ b/packages/rocketchat-autotranslate/server/methods/getSupportedLanguages.js
@@ -1,7 +1,7 @@
Meteor.methods({
'autoTranslate.getSupportedLanguages'(targetLanguage) {
if (!RocketChat.authz.hasPermission(Meteor.userId(), 'auto-translate')) {
- throw new Meteor.Error('error-action-now-allowed', 'Auto-Translate is not allowed', { method: 'autoTranslate.saveSettings'});
+ throw new Meteor.Error('error-action-not-allowed', 'Auto-Translate is not allowed', { method: 'autoTranslate.saveSettings'});
}
return RocketChat.AutoTranslate.getSupportedLanguages(targetLanguage);
diff --git a/packages/rocketchat-autotranslate/server/methods/saveSettings.js b/packages/rocketchat-autotranslate/server/methods/saveSettings.js
index 1030436bcddad..e9ed6dd6fb574 100644
--- a/packages/rocketchat-autotranslate/server/methods/saveSettings.js
+++ b/packages/rocketchat-autotranslate/server/methods/saveSettings.js
@@ -5,7 +5,7 @@ Meteor.methods({
}
if (!RocketChat.authz.hasPermission(Meteor.userId(), 'auto-translate')) {
- throw new Meteor.Error('error-action-now-allowed', 'Auto-Translate is not allowed', { method: 'autoTranslate.saveSettings'});
+ throw new Meteor.Error('error-action-not-allowed', 'Auto-Translate is not allowed', { method: 'autoTranslate.saveSettings'});
}
check(rid, String);
diff --git a/packages/rocketchat-i18n/i18n/en.i18n.json b/packages/rocketchat-i18n/i18n/en.i18n.json
index 46d3aebac22a0..8b65d06cd259c 100644
--- a/packages/rocketchat-i18n/i18n/en.i18n.json
+++ b/packages/rocketchat-i18n/i18n/en.i18n.json
@@ -534,6 +534,7 @@
"Common_Access": "Common Access",
"Community": "Community",
"Compact": "Compact",
+ "Condensed": "Condensed",
"Computer": "Computer",
"Confirm_password": "Confirm your password",
"Consulting": "Consulting",
@@ -1063,7 +1064,9 @@
"error-remove-last-owner": "This is the last owner. Please set a new owner before removing this one.",
"error-role-in-use": "Cannot delete role because it's in use",
"error-role-name-required": "Role name is required",
+ "error-room-is-not-closed": "Room is not closed",
"error-the-field-is-required": "The field __field__ is required.",
+ "error-this-is-not-a-livechat-room": "This is not a Livechat room",
"error-too-many-requests": "Error, too many requests. Please slow down. You must wait __seconds__ seconds before trying again.",
"error-user-has-no-roles": "User has no roles",
"error-user-is-not-activated": "User is not activated",
@@ -1652,6 +1655,7 @@
"Markdown_SupportSchemesForLink_Description": "Comma-separated list of allowed schemes",
"Max_length_is": "Max length is %s",
"Media": "Media",
+ "Medium": "Medium",
"Members_List": "Members List",
"mention-all": "Mention All",
"mention-all_description": "Permission to use the @all mention",
diff --git a/packages/rocketchat-i18n/i18n/pt-BR.i18n.json b/packages/rocketchat-i18n/i18n/pt-BR.i18n.json
index 30e1105566fd9..3c33b5ba9d8c9 100644
--- a/packages/rocketchat-i18n/i18n/pt-BR.i18n.json
+++ b/packages/rocketchat-i18n/i18n/pt-BR.i18n.json
@@ -1059,7 +1059,9 @@
"error-remove-last-owner": "Este é o último proprietário. Por favor, defina um novo proprietário antes de remover este.",
"error-role-in-use": "Não é possível remover o papel pois ele está em uso",
"error-role-name-required": "Nome do papel é obrigatório",
+ "error-room-is-not-closed": "Sala não está fechada",
"error-the-field-is-required": "O campo __field__ é obrigatório.",
+ "error-this-is-not-a-livechat-room": "Esta não é uma sala de Livechat",
"error-too-many-requests": "Erro, muitas solicitações. Por favor, diminua a velocidade. Você deve esperar __seconds__ segundos antes de tentar novamente.",
"error-user-has-no-roles": "O usuário não possui permissões",
"error-user-is-not-activated": "O usuário não está ativo",
diff --git a/packages/rocketchat-i18n/i18n/pt.i18n.json b/packages/rocketchat-i18n/i18n/pt.i18n.json
index bf32a1263dd1e..598fdcd3af063 100644
--- a/packages/rocketchat-i18n/i18n/pt.i18n.json
+++ b/packages/rocketchat-i18n/i18n/pt.i18n.json
@@ -1059,7 +1059,9 @@
"error-remove-last-owner": "Este é o último proprietário. Por favor, defina um novo proprietário antes de remover este.",
"error-role-in-use": "Não é possível remover o papel pois ele está em uso",
"error-role-name-required": "Nome do papel é obrigatório",
+ "error-room-is-not-closed": "Sala não está fechada",
"error-the-field-is-required": "O campo __field__ é obrigatório.",
+ "error-this-is-not-a-livechat-room": "Esta não é uma sala de Livechat",
"error-too-many-requests": "Erro, muitas solicitações. Por favor, diminua a velocidade. Você deve esperar __seconds__ segundos antes de tentar novamente.",
"error-user-has-no-roles": "O usuário não possui papéis",
"error-user-is-not-activated": "O usuário não está ativo",
diff --git a/packages/rocketchat-i18n/i18n/ru.i18n.json b/packages/rocketchat-i18n/i18n/ru.i18n.json
index 4dd9294a89692..1430a6287bf28 100644
--- a/packages/rocketchat-i18n/i18n/ru.i18n.json
+++ b/packages/rocketchat-i18n/i18n/ru.i18n.json
@@ -181,7 +181,7 @@
"Accounts_UserAddedEmail_Description": "Вы можете использовать следующие подстановки:
[name], [fname], [lname] для полного имени пользователя, только имени или только фамилии, соответственно).
[email] - для email адреса пользователя.
[password] - для пароля пользователя.
[Site_Name] и [Site_URL] - название вашего приложения и его URL.
",
"Accounts_UserAddedEmailSubject_Default": "Вы были добавлены в [Site_Name]",
"Activate": "Активировать",
- "Activity": "Активность",
+ "Activity": "По активности",
"Add": "Добавить",
"add-oauth-service": "Добавить сервис Oauth",
"add-oauth-service_description": "Разрешение на добавление новых сервисов Oauth",
@@ -533,6 +533,7 @@
"Community": "Сообщество",
"Compact": "Компактный",
"Computer": "Компьютер",
+ "Condensed": "Компактный",
"Confirm_password": "Подтвердить пароль",
"Consulting": "Консалтинг",
"Consumer_Goods": "Потребительские товары",
@@ -1235,6 +1236,7 @@
"Idle_Time_Limit": "Предел времени ожидания",
"Idle_Time_Limit_Description": "Период времени, пока статус не изменится. Значение должно быть в секундах.",
"If_this_email_is_registered": "Если этот адрес электронной почты зарегистрирован, мы отправим на него инструкцию по сбросу пароля. Если вы не получили электронное сообщение, попробуйте снова позже.",
+ "Idle_Time_Limit": "Время ожидания",
"If_you_are_sure_type_in_your_password": "Если вы уверены, введите пароль:",
"If_you_are_sure_type_in_your_username": "Если вы уверены, введите ваш логин:",
"If_you_dont_have_one_send_an_email_to_omni_rocketchat_to_get_yours": "Если у вас нет одного, отправьте электронное сообщение на адрес [omni@rocket.chat] (mailto: omni@rocket.chat), чтобы получить свой.",
@@ -1632,6 +1634,7 @@
"Markdown_SupportSchemesForLink_Description": "Разрешённые Markdown системы через запятую",
"Max_length_is": "Максимальная длина %s",
"Media": "СМИ",
+ "Medium": "Обычный",
"Members_List": "Пользователи",
"mention-all": "Упоминать всех",
"mention-all_description": "Разрешение на использование упоминания @all",
@@ -2024,7 +2027,7 @@
"Require_all_tokens": "Требовать все токены",
"Require_any_token": "Требовать любой токен",
"Require_password_change": "Требуется смена пароля",
- "Resend_verification_email": "Отправить проверочное электронное письмо ещё раз",
+ "Resend_verification_email": "Отправить проверочный e-mail снова",
"Reset": "Восстановить",
"Reset_password": "Восстановить пароль",
"Reset_section_settings": "Восстановить значения по умолчанию",
@@ -2184,7 +2187,7 @@
"Show_only_online": "Показать только подключенных",
"Show_preregistration_form": "Показать предварительную регистрационную форму",
"Show_queue_list_to_all_agents": "Показывать список очередей всем представителям",
- "Show_room_counter_on_sidebar": "Показывать число комнат на боковой панели",
+ "Show_room_counter_on_sidebar": "Показывать количество чатов на боковой панели",
"Show_the_keyboard_shortcut_list": "Показывать список горячих клавиш",
"Showing_archived_results": "