Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RocketChat
Rocket.Chat
Commits
1b390c72
Unverified
Commit
1b390c72
authored
11 months ago
by
Tiago Evangelista Pinto
Committed by
GitHub
11 months ago
Browse files
Options
Downloads
Patches
Plain Diff
fix: Client check `AutoTranslate_Enabled` setting before a server endpoint call (#32221)
parent
6b053aed
No related branches found
Branches containing commit
Tags
6.1.7
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.changeset/strange-comics-camp.md
+5
-0
5 additions, 0 deletions
.changeset/strange-comics-camp.md
apps/meteor/app/autotranslate/client/lib/autotranslate.ts
+2
-1
2 additions, 1 deletion
apps/meteor/app/autotranslate/client/lib/autotranslate.ts
with
7 additions
and
1 deletion
.changeset/strange-comics-camp.md
0 → 100644
+
5
−
0
View file @
1b390c72
---
"
@rocket.chat/meteor"
:
patch
---
Fixed an issue where an endpoint was called before checking configuration that enables automatic translation when launching the application
This diff is collapsed.
Click to expand it.
apps/meteor/app/autotranslate/client/lib/autotranslate.ts
+
2
−
1
View file @
1b390c72
...
@@ -17,6 +17,7 @@ import {
...
@@ -17,6 +17,7 @@ import {
}
from
'
../../../../client/views/room/MessageList/lib/autoTranslate
'
;
}
from
'
../../../../client/views/room/MessageList/lib/autoTranslate
'
;
import
{
hasPermission
}
from
'
../../../authorization/client
'
;
import
{
hasPermission
}
from
'
../../../authorization/client
'
;
import
{
Subscriptions
,
Messages
}
from
'
../../../models/client
'
;
import
{
Subscriptions
,
Messages
}
from
'
../../../models/client
'
;
import
{
settings
}
from
'
../../../settings/client
'
;
import
{
sdk
}
from
'
../../../utils/client/lib/SDKClient
'
;
import
{
sdk
}
from
'
../../../utils/client/lib/SDKClient
'
;
let
userLanguage
=
'
en
'
;
let
userLanguage
=
'
en
'
;
...
@@ -102,7 +103,7 @@ export const AutoTranslate = {
...
@@ -102,7 +103,7 @@ export const AutoTranslate = {
Tracker
.
autorun
(
async
(
c
)
=>
{
Tracker
.
autorun
(
async
(
c
)
=>
{
const
uid
=
Meteor
.
userId
();
const
uid
=
Meteor
.
userId
();
if
(
!
uid
||
!
hasPermission
(
'
auto-translate
'
))
{
if
(
!
settings
.
get
(
'
AutoTranslate_Enabled
'
)
||
!
uid
||
!
hasPermission
(
'
auto-translate
'
))
{
return
;
return
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment