Merge branch 'master' into MM-45118_my_top_dms
Этот коммит содержится в:
@@ -46,7 +46,7 @@ func (s *postServiceWrapper) CreatePost(ctx *request.Context, post *model.Post)
|
||||
return s.app.CreatePostMissingChannel(ctx, post, true)
|
||||
}
|
||||
|
||||
func (a *App) CreatePostAsUser(c *request.Context, post *model.Post, currentSessionId string, setOnline bool) (*model.Post, *model.AppError) {
|
||||
func (a *App) CreatePostAsUser(c request.CTX, post *model.Post, currentSessionId string, setOnline bool) (*model.Post, *model.AppError) {
|
||||
// Check that channel has not been deleted
|
||||
channel, errCh := a.Srv().Store.Channel().Get(post.ChannelId, true)
|
||||
if errCh != nil {
|
||||
@@ -83,7 +83,7 @@ func (a *App) CreatePostAsUser(c *request.Context, post *model.Post, currentSess
|
||||
isCRTReply := post.RootId != "" && a.IsCRTEnabledForUser(c, post.UserId)
|
||||
if !fromWebhook && !fromBot && !isCRTReply {
|
||||
if _, err := a.MarkChannelsAsViewed(c, []string{post.ChannelId}, post.UserId, currentSessionId, true); err != nil {
|
||||
mlog.Warn(
|
||||
c.Logger().Warn(
|
||||
"Encountered error updating last viewed",
|
||||
mlog.String("channel_id", post.ChannelId),
|
||||
mlog.String("user_id", post.UserId),
|
||||
@@ -1251,7 +1251,7 @@ func (a *App) DeletePost(c request.CTX, postID, deleteByID string) (*model.Post,
|
||||
|
||||
postJSON, jsonErr := json.Marshal(post)
|
||||
if jsonErr != nil {
|
||||
mlog.Warn("Failed to encode post to JSON")
|
||||
return nil, model.NewAppError("DeletePost", "api.marshal_error", nil, "", http.StatusInternalServerError).Wrap(jsonErr)
|
||||
}
|
||||
|
||||
userMessage := model.NewWebSocketEvent(model.WebsocketEventPostDeleted, "", post.ChannelId, "", nil)
|
||||
|
||||
Ссылка в новой задаче
Block a user