Remove admin enableMessageParserEarlyAdoption
This commit is contained in:
parent
be431179e7
commit
56ee8d45cd
|
@ -26,9 +26,6 @@ export default {
|
|||
Accounts_CustomFields: {
|
||||
type: 'valueAsString'
|
||||
},
|
||||
Accounts_Default_User_Preferences_enableMessageParserEarlyAdoption: {
|
||||
type: 'valueAsBoolean'
|
||||
},
|
||||
Accounts_EmailOrUsernamePlaceholder: {
|
||||
type: 'valueAsString'
|
||||
},
|
||||
|
|
|
@ -84,5 +84,5 @@ export default class Message extends Model {
|
|||
|
||||
@field('tshow') tshow;
|
||||
|
||||
@field('md') md;
|
||||
@json('md', sanitizer) md;
|
||||
}
|
||||
|
|
|
@ -20,6 +20,10 @@ const changeMessageStatus = async(id, tmid, status, message) => {
|
|||
m.mentions = message.mentions;
|
||||
m.channels = message.channels;
|
||||
}
|
||||
|
||||
if (message.md) {
|
||||
m.md = message.md;
|
||||
}
|
||||
})
|
||||
);
|
||||
|
||||
|
|
|
@ -57,7 +57,6 @@ class ProfileView extends React.Component {
|
|||
Accounts_AllowRealNameChange: PropTypes.bool,
|
||||
Accounts_AllowUserAvatarChange: PropTypes.bool,
|
||||
Accounts_AllowUsernameChange: PropTypes.bool,
|
||||
Accounts_enableMessageParserEarlyAdoption: PropTypes.bool,
|
||||
Accounts_CustomFields: PropTypes.string,
|
||||
setUser: PropTypes.func,
|
||||
theme: PropTypes.string
|
||||
|
@ -74,8 +73,7 @@ class ProfileView extends React.Component {
|
|||
avatarUrl: null,
|
||||
avatar: {},
|
||||
avatarSuggestions: {},
|
||||
customFields: {},
|
||||
preferences: []
|
||||
customFields: {}
|
||||
};
|
||||
|
||||
async componentDidMount() {
|
||||
|
@ -112,15 +110,12 @@ class ProfileView extends React.Component {
|
|||
this.setState({ avatar });
|
||||
}
|
||||
|
||||
init = async(user) => {
|
||||
init = (user) => {
|
||||
const { user: userProps } = this.props;
|
||||
const {
|
||||
name, username, emails, customFields, id
|
||||
name, username, emails, customFields, enableMessageParserEarlyAdoption
|
||||
} = user || userProps;
|
||||
|
||||
const result = await RocketChat.getUserPreferences(id);
|
||||
const { preferences } = result;
|
||||
|
||||
this.setState({
|
||||
name,
|
||||
username,
|
||||
|
@ -130,14 +125,13 @@ class ProfileView extends React.Component {
|
|||
avatarUrl: null,
|
||||
avatar: {},
|
||||
customFields: customFields || {},
|
||||
enableMessageParser: preferences?.enableMessageParserEarlyAdoption || false,
|
||||
preferences
|
||||
enableMessageParser: enableMessageParserEarlyAdoption || false
|
||||
});
|
||||
}
|
||||
|
||||
formIsChanged = () => {
|
||||
const {
|
||||
name, username, email, newPassword, avatar, customFields, enableMessageParser, preferences
|
||||
name, username, email, newPassword, avatar, customFields, enableMessageParser
|
||||
} = this.state;
|
||||
const { user } = this.props;
|
||||
let customFieldsChanged = false;
|
||||
|
@ -153,7 +147,7 @@ class ProfileView extends React.Component {
|
|||
|
||||
return !(user.name === name
|
||||
&& user.username === username
|
||||
&& preferences.enableMessageParserEarlyAdoption === enableMessageParser
|
||||
&& user.enableMessageParserEarlyAdoption === enableMessageParser
|
||||
&& !newPassword
|
||||
&& (user.emails && user.emails[0].address === email)
|
||||
&& !avatar.data
|
||||
|
@ -480,8 +474,7 @@ class ProfileView extends React.Component {
|
|||
Accounts_AllowRealNameChange,
|
||||
Accounts_AllowUserAvatarChange,
|
||||
Accounts_AllowUsernameChange,
|
||||
Accounts_CustomFields,
|
||||
Accounts_enableMessageParserEarlyAdoption
|
||||
Accounts_CustomFields
|
||||
} = this.props;
|
||||
|
||||
return (
|
||||
|
@ -568,14 +561,11 @@ class ProfileView extends React.Component {
|
|||
theme={theme}
|
||||
/>
|
||||
<List.Separator />
|
||||
{Accounts_enableMessageParserEarlyAdoption
|
||||
? (
|
||||
<List.Item
|
||||
title='Enable_Message_Parser'
|
||||
testID='profile-view-enable-message-parser'
|
||||
right={() => this.renderMessageParserSwitch()}
|
||||
/>
|
||||
) : null}
|
||||
<List.Item
|
||||
title='Enable_Message_Parser'
|
||||
testID='profile-view-enable-message-parser'
|
||||
right={() => this.renderMessageParserSwitch()}
|
||||
/>
|
||||
<List.Separator />
|
||||
{this.renderCustomFields()}
|
||||
<RCTextInput
|
||||
|
@ -625,7 +615,6 @@ const mapStateToProps = state => ({
|
|||
Accounts_AllowUserAvatarChange: state.settings.Accounts_AllowUserAvatarChange,
|
||||
Accounts_AllowUsernameChange: state.settings.Accounts_AllowUsernameChange,
|
||||
Accounts_CustomFields: state.settings.Accounts_CustomFields,
|
||||
Accounts_enableMessageParserEarlyAdoption: state.settings.Accounts_Default_User_Preferences_enableMessageParserEarlyAdoption,
|
||||
baseUrl: state.server.server
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in New Issue