diff --git a/server/channels/api4/post.go b/server/channels/api4/post.go index 8280877f5a..98ac08acf8 100644 --- a/server/channels/api4/post.go +++ b/server/channels/api4/post.go @@ -915,7 +915,7 @@ func patchPost(c *Context, w http.ResponseWriter, r *http.Request) { } // Updating the file_ids of a post is not a supported operation and will be ignored - post.FileIds = nil + //post.FileIds = nil originalPost, err := c.App.GetSinglePost(c.AppContext, c.Params.PostId, false) if err != nil { diff --git a/webapp/channels/src/packages/mattermost-redux/src/selectors/entities/scheduled_posts.ts b/webapp/channels/src/packages/mattermost-redux/src/selectors/entities/scheduled_posts.ts index 3da5b8797b..cb036246ee 100644 --- a/webapp/channels/src/packages/mattermost-redux/src/selectors/entities/scheduled_posts.ts +++ b/webapp/channels/src/packages/mattermost-redux/src/selectors/entities/scheduled_posts.ts @@ -63,7 +63,7 @@ export function showChannelOrThreadScheduledPostIndicator(state: GlobalState, ch const allChannelScheduledPosts = state.entities.scheduledPosts.byChannelOrThreadId[channelOrThreadId] || emptyList; const eligibleScheduledPosts = allChannelScheduledPosts.filter((scheduledPostId: string) => { const scheduledPost = state.entities.scheduledPosts.byId[scheduledPostId]; - return !scheduledPost.error_code; + return !scheduledPost?.error_code; }); const data = { diff --git a/webapp/platform/types/src/schedule_post.ts b/webapp/platform/types/src/schedule_post.ts index aea147dac2..b48714c141 100644 --- a/webapp/platform/types/src/schedule_post.ts +++ b/webapp/platform/types/src/schedule_post.ts @@ -18,7 +18,7 @@ export type ScheduledPost = Omit & SchedulingInfo & { export type ScheduledPostsState = { byId: { - [scheduledPostId: string]: ScheduledPost; + [scheduledPostId: string]: ScheduledPost | undefined; }; byTeamId: { [teamId: string]: string[];