fix: handle error from InvalidateAllCaches in slack.go (#30606)

* fix: hanlde error from InvalidateAllCaches in slack.go

* change signature of InvalidateAllCaches to *model.AppError

* return  err from InvalidateAllCaches everywhere

* Formatting

---------

Co-authored-by: Ben Schumacher <ben.schumacher@mattermost.com>
Этот коммит содержится в:
kasyap dharanikota
2025-04-14 13:54:21 +05:30
коммит произвёл GitHub
родитель d808bc94e9
Коммит ae046fb34e
5 изменённых файлов: 15 добавлений и 9 удалений

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

@@ -38,7 +38,7 @@ func (a *App) SlackImport(c request.CTX, fileData multipart.File, fileSize int64
},
GenerateThumbnailImage: a.generateThumbnailImage,
GeneratePreviewImage: a.generatePreviewImage,
InvalidateAllCaches: func() { a.ch.srv.InvalidateAllCaches() },
InvalidateAllCaches: func() *model.AppError { return a.ch.srv.platform.InvalidateAllCaches() },
MaxPostSize: func() int { return a.ch.srv.platform.MaxPostSize() },
PrepareImage: func(fileData []byte) (image.Image, string, func(), error) {
img, imgType, release, err := prepareImage(c, a.ch.imgDecoder, bytes.NewReader(fileData))