[MM-56073] MMCTL delete post command (#27539)

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Этот коммит содержится в:
Ben Cooke
2024-10-08 10:45:31 -04:00
коммит произвёл GitHub
родитель a671f80d2c
Коммит b3c7ef0b97
39 изменённых файлов: 1246 добавлений и 152 удалений

Просмотреть файл

@@ -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;
};