Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion app/i18n/locales/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ export default {
No_Reactions: 'No Reactions',
No_Read_Receipts: 'No Read Receipts',
Not_logged: 'Not logged',
Not_is_rc: 'Apparently this is not a server Rocket.Chat - Contact your server admin',
Comment thread
djorkaeffalexandre marked this conversation as resolved.
Outdated
Nothing: 'Nothing',
Nothing_to_save: 'Nothing to save!',
Notify_active_in_this_room: 'Notify active users in this room',
Expand Down Expand Up @@ -375,7 +376,7 @@ export default {
Tap_to_view_servers_list: 'Tap to view servers list',
Terms_of_Service: ' Terms of Service ',
Theme: 'Theme',
The_URL_is_invalid: 'The URL you entered is invalid. Check it and try again, please!',
The_URL_is_invalid: 'The URL you entered is invalid or unable to establish a secure connection. Check it and try again, please!',
Comment thread
djorkaeffalexandre marked this conversation as resolved.
Outdated
Comment thread
djorkaeffalexandre marked this conversation as resolved.
Outdated
There_was_an_error_while_action: 'There was an error while {{action}}!',
This_room_is_blocked: 'This room is blocked',
This_room_is_read_only: 'This room is read only',
Expand Down Expand Up @@ -420,6 +421,7 @@ export default {
Video_call: 'Video call',
View_Original: 'View Original',
Voice_call: 'Voice call',
Websocket_disabled: 'Server must have Websocket enabled - Contact your server admin',
Welcome: 'Welcome',
Welcome_to_RocketChat: 'Welcome to Rocket.Chat',
Whats_your_2fa: 'What\'s your 2FA code?',
Expand Down
4 changes: 3 additions & 1 deletion app/i18n/locales/pt-BR.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ export default {
Nothing_to_save: 'Nada para salvar!',
Notify_active_in_this_room: 'Notificar usuários ativos nesta sala',
Notify_all_in_this_room: 'Notificar todos nesta sala',
Not_is_rc: 'Aparentemente este não é um servidor Rocket.Chat - Contate o administrador do servidor',
Offline: 'Offline',
Oops: 'Ops!',
Online: 'Online',
Expand Down Expand Up @@ -334,7 +335,7 @@ export default {
Take_a_photo: 'Tirar uma foto',
Take_a_video: 'Gravar um vídeo',
Terms_of_Service: ' Termos de Serviço ',
The_URL_is_invalid: 'A URL fornecida é inválida ou não acessível. Por favor tente novamente, mas com uma url diferente.',
The_URL_is_invalid: 'A URL fornecida é inválida ou não acessível ou incapaz de estabelecer uma conexão segura. Por favor tente novamente, mas com uma url diferente.',
There_was_an_error_while_action: 'Aconteceu um erro {{action}}!',
This_room_is_blocked: 'Este quarto está bloqueado',
This_room_is_read_only: 'Este quarto é apenas de leitura',
Expand Down Expand Up @@ -375,6 +376,7 @@ export default {
Username_or_email: 'Usuário ou email',
Video_call: 'Chamada de vídeo',
Voice_call: 'Chamada de voz',
Websocket_disabled: 'O servidor precisa ter o Websocket ativado - Contate o administrador do servidor',
Welcome: 'Bem vindo',
Welcome_to_RocketChat: 'Bem vindo ao Rocket.Chat',
Whats_your_2fa: 'Qual seu código de autenticação?',
Expand Down
17 changes: 16 additions & 1 deletion app/lib/rocketchat.js
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,22 @@ const RocketChat = {
},
async getServerInfo(server) {
try {
const result = await fetch(`${ server }/api/info`).then(response => response.json());
let result = await fetch(`${ server }/api/info`)
.then(response => response.text());
Comment thread
djorkaeffalexandre marked this conversation as resolved.
Outdated
try {
result = JSON.parse(result);
if (!{}.hasOwnProperty.call(result, 'success')) {
Comment thread
djorkaeffalexandre marked this conversation as resolved.
Outdated
return {
success: false,
message: 'Not_is_rc'
};
}
} catch (e) { // if returns html on body
Comment thread
djorkaeffalexandre marked this conversation as resolved.
Outdated
return {
success: false,
message: 'Not_is_rc'
};
}
if (result.success) {
if (semver.lt(result.version, MIN_ROCKETCHAT_VERSION)) {
return {
Expand Down