-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into chore/remove-openroom-method
- Loading branch information
Showing
96 changed files
with
2,094 additions
and
1,462 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"@rocket.chat/meteor": patch | ||
"@rocket.chat/model-typings": patch | ||
--- | ||
|
||
Fixes Unit's `numDepartments` property not being updated after a department is removed |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@rocket.chat/apps-engine': patch | ||
--- | ||
|
||
Fixes the subprocess restarting routine failing to correctly restart apps in some cases |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@rocket.chat/meteor': patch | ||
--- | ||
|
||
Fixes an issue where room members menu doesn't display properly without enough space |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rocket.chat/meteor": patch | ||
--- | ||
|
||
Fixes an issue with Federation startup where the bridge would intermittently fail to start causing error being shown "Matrix Bridge isn't running yet". |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@rocket.chat/meteor": patch | ||
--- | ||
|
||
Fixes a behavior of the mentions parser that identified mentions inside markdown links text. Now, these components will be removed from the text before trying to parse mentions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@rocket.chat/meteor': patch | ||
--- | ||
|
||
Fixes special characters not being escaped on sidepanel extended view |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,96 +1,7 @@ | ||
import { Meteor } from 'meteor/meteor'; | ||
import { Tracker } from 'meteor/tracker'; | ||
|
||
import { AutoTranslate } from './autotranslate'; | ||
import { roomCoordinator } from '../../../../client/lib/rooms/roomCoordinator'; | ||
import { | ||
hasTranslationLanguageInAttachments, | ||
hasTranslationLanguageInMessage, | ||
} from '../../../../client/views/room/MessageList/lib/autoTranslate'; | ||
import { hasAtLeastOnePermission } from '../../../authorization/client'; | ||
import { Messages } from '../../../models/client'; | ||
import { settings } from '../../../settings/client'; | ||
import { MessageAction } from '../../../ui-utils/client/lib/MessageAction'; | ||
import { sdk } from '../../../utils/client/lib/SDKClient'; | ||
|
||
Meteor.startup(() => { | ||
AutoTranslate.init(); | ||
|
||
Tracker.autorun(() => { | ||
if (settings.get('AutoTranslate_Enabled') && hasAtLeastOnePermission(['auto-translate'])) { | ||
MessageAction.addButton({ | ||
id: 'translate', | ||
icon: 'language', | ||
label: 'Translate', | ||
context: ['message', 'message-mobile', 'threads'], | ||
type: 'interaction', | ||
action(_, { message }) { | ||
const language = AutoTranslate.getLanguage(message.rid); | ||
if (!hasTranslationLanguageInMessage(message, language) && !hasTranslationLanguageInAttachments(message.attachments, language)) { | ||
(AutoTranslate.messageIdsToWait as any)[message._id] = true; | ||
Messages.update({ _id: message._id }, { $set: { autoTranslateFetching: true } }); | ||
void sdk.call('autoTranslate.translateMessage', message, language); | ||
} | ||
const action = 'autoTranslateShowInverse' in message ? '$unset' : '$set'; | ||
Messages.update({ _id: message._id }, { [action]: { autoTranslateShowInverse: true } }); | ||
}, | ||
condition({ message, subscription, user, room }) { | ||
if (!user) { | ||
return false; | ||
} | ||
const language = subscription?.autoTranslateLanguage || AutoTranslate.getLanguage(message.rid) || ''; | ||
const isLivechatRoom = roomCoordinator.isLivechatRoom(room?.t); | ||
const isDifferentUser = message?.u && message.u._id !== user._id; | ||
const autoTranslateEnabled = subscription?.autoTranslate || isLivechatRoom; | ||
const hasLanguage = | ||
hasTranslationLanguageInMessage(message, language) || hasTranslationLanguageInAttachments(message.attachments, language); | ||
|
||
return Boolean( | ||
(message as { autoTranslateShowInverse?: boolean }).autoTranslateShowInverse || | ||
(isDifferentUser && autoTranslateEnabled && !hasLanguage), | ||
); | ||
}, | ||
order: 90, | ||
}); | ||
MessageAction.addButton({ | ||
id: 'view-original', | ||
icon: 'language', | ||
label: 'View_original', | ||
context: ['message', 'message-mobile', 'threads'], | ||
type: 'interaction', | ||
action(_, props) { | ||
const { message } = props; | ||
const language = AutoTranslate.getLanguage(message.rid); | ||
if (!hasTranslationLanguageInMessage(message, language) && !hasTranslationLanguageInAttachments(message.attachments, language)) { | ||
(AutoTranslate.messageIdsToWait as any)[message._id] = true; | ||
Messages.update({ _id: message._id }, { $set: { autoTranslateFetching: true } }); | ||
void sdk.call('autoTranslate.translateMessage', message, language); | ||
} | ||
const action = 'autoTranslateShowInverse' in message ? '$unset' : '$set'; | ||
Messages.update({ _id: message._id }, { [action]: { autoTranslateShowInverse: true } }); | ||
}, | ||
condition({ message, subscription, user, room }) { | ||
const language = subscription?.autoTranslateLanguage || AutoTranslate.getLanguage(message.rid) || ''; | ||
const isLivechatRoom = roomCoordinator.isLivechatRoom(room?.t); | ||
if (!user) { | ||
return false; | ||
} | ||
const isDifferentUser = message?.u && message.u._id !== user._id; | ||
const autoTranslateEnabled = subscription?.autoTranslate || isLivechatRoom; | ||
const hasLanguage = | ||
hasTranslationLanguageInMessage(message, language) || hasTranslationLanguageInAttachments(message.attachments, language); | ||
|
||
return Boolean( | ||
!(message as { autoTranslateShowInverse?: boolean }).autoTranslateShowInverse && | ||
isDifferentUser && | ||
autoTranslateEnabled && | ||
hasLanguage, | ||
); | ||
}, | ||
order: 90, | ||
}); | ||
} else { | ||
MessageAction.removeButton('toggle-language'); | ||
} | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.