[MM-64360] Data retention: optionally preserve pinned posts (#31165)
* add new config to preserve pinned posts during data retention * more graceful error if the pinned post was a reply in a deleted thread
Этот коммит содержится в:
@@ -60,6 +60,16 @@ const ErrorMessage: React.FC<Props> = ({type, message, service, isGuest}: Props)
|
||||
</p>
|
||||
);
|
||||
break;
|
||||
case ErrorPageTypes.POST_NOT_FOUND:
|
||||
errorMessage = (
|
||||
<p>
|
||||
<FormattedMessage
|
||||
id='post.error.access'
|
||||
defaultMessage="The post you're requesting is private or does not exist."
|
||||
/>
|
||||
</p>
|
||||
);
|
||||
break;
|
||||
case ErrorPageTypes.CLOUD_ARCHIVED:
|
||||
errorMessage = (
|
||||
<p>
|
||||
|
||||
@@ -31,6 +31,14 @@ const ErrorTitle: React.FC<Props> = ({type, title}: Props) => {
|
||||
/>
|
||||
);
|
||||
break;
|
||||
case ErrorPageTypes.POST_NOT_FOUND:
|
||||
errorTitle = (
|
||||
<FormattedMessage
|
||||
id='post.error.title'
|
||||
defaultMessage='Post Not Found'
|
||||
/>
|
||||
);
|
||||
break;
|
||||
case ErrorPageTypes.CLOUD_ARCHIVED:
|
||||
errorTitle = (
|
||||
<FormattedMessage
|
||||
|
||||
@@ -52,6 +52,11 @@ function focusReplyPost(post: Post, channel: Channel, teamId: string, returnTo:
|
||||
return async (dispatch, getState) => {
|
||||
const {data} = await dispatch(getPostThread(post.root_id));
|
||||
|
||||
if (!data) {
|
||||
getHistory().replace(`/error?type=${ErrorPageTypes.POST_NOT_FOUND}&returnTo=${returnTo}`);
|
||||
return {data: false};
|
||||
}
|
||||
|
||||
if (data!.first_inaccessible_post_time) {
|
||||
getHistory().replace(`/error?type=${ErrorPageTypes.CLOUD_ARCHIVED}&returnTo=${returnTo}`);
|
||||
return {data: false};
|
||||
|
||||
@@ -5008,6 +5008,8 @@
|
||||
"post.ariaLabel.reaction": ", 1 reaction",
|
||||
"post.ariaLabel.reactionMultiple": ", {reactionCount} reactions",
|
||||
"post.ariaLabel.replyMessage": "At {time} {date}, {authorName} replied, {message}",
|
||||
"post.error.access": "The post you're requesting is private or does not exist.",
|
||||
"post.error.title": "Post Not Found",
|
||||
"post.reminder.acknowledgement": "You will be reminded at {reminderTime}, {reminderDate} about this message from {username}: {permaLink}",
|
||||
"post.reminder.systemBot": "Hi there, here's your reminder about this message from {username}: {permaLink}",
|
||||
"post.renderError.message": "An error occurred while rendering this post.",
|
||||
|
||||
@@ -927,6 +927,7 @@ export const ErrorPageTypes = {
|
||||
PERMALINK_NOT_FOUND: 'permalink_not_found',
|
||||
TEAM_NOT_FOUND: 'team_not_found',
|
||||
CHANNEL_NOT_FOUND: 'channel_not_found',
|
||||
POST_NOT_FOUND: 'post_not_found',
|
||||
CLOUD_ARCHIVED: 'cloud_archived',
|
||||
};
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user