[MM-56073] MMCTL delete post command (#27539)
Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Этот коммит содержится в:
@@ -311,7 +311,7 @@ describe('posts', () => {
|
||||
expect(nextState).not.toBe(state);
|
||||
expect(nextState.post1).not.toBe(state.post1);
|
||||
expect(nextState).toEqual({
|
||||
post1: {id: 'post1', file_ids: [], has_reactions: false, state: Posts.POST_DELETED},
|
||||
post1: {id: 'post1', message: '', file_ids: [], has_reactions: false, state: Posts.POST_DELETED},
|
||||
});
|
||||
});
|
||||
|
||||
@@ -386,7 +386,7 @@ describe('posts', () => {
|
||||
expect(nextState.comment2).toBe(state.comment2);
|
||||
expect(nextState).toEqual({
|
||||
post1: {id: 'post1'},
|
||||
comment1: {id: 'comment1', root_id: 'post1', file_ids: [], has_reactions: false, state: Posts.POST_DELETED},
|
||||
comment1: {id: 'comment1', message: '', root_id: 'post1', file_ids: [], has_reactions: false, state: Posts.POST_DELETED},
|
||||
comment2: {id: 'comment2', root_id: 'post1'},
|
||||
});
|
||||
});
|
||||
|
||||
@@ -194,6 +194,7 @@ export function handlePosts(state: IDMappedObjects<Post> = {}, action: AnyAction
|
||||
[post.id]: {
|
||||
...state[post.id],
|
||||
state: Posts.POST_DELETED,
|
||||
message: '',
|
||||
file_ids: [],
|
||||
has_reactions: false,
|
||||
},
|
||||
|
||||
@@ -395,6 +395,7 @@ export type ServiceSettings = {
|
||||
UniqueEmojiReactionLimitPerPost: number;
|
||||
RefreshPostStatsRunTime: string;
|
||||
MaximumPayloadSizeBytes: number;
|
||||
EnableAPIPostDeletion: boolean;
|
||||
MaximumURLLength: number;
|
||||
};
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user