Revert temporary webhook debugging (#9934)
* Revert "More temporary debugging (#9932)" This reverts commiteab2336bb1. * Revert "Add temporary webhook debug logs (#9931)" This reverts commit043a455ce3.
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
2770d4db64
Коммит
2b99627026
@@ -135,7 +135,6 @@ func (a *App) CreatePost(post *model.Post, channel *model.Channel, triggerWebhoo
|
|||||||
|
|
||||||
post.Hashtags, _ = model.ParseHashtags(post.Message)
|
post.Hashtags, _ = model.ParseHashtags(post.Message)
|
||||||
|
|
||||||
mlog.Debug(model.StringInterfaceToJson(post.Props))
|
|
||||||
if err := a.FillInPostProps(post, channel); err != nil {
|
if err := a.FillInPostProps(post, channel); err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
@@ -160,7 +159,6 @@ func (a *App) CreatePost(post *model.Post, channel *model.Channel, triggerWebhoo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mlog.Debug(model.StringInterfaceToJson(post.Props))
|
|
||||||
result = <-a.Srv.Store.Post().Save(post)
|
result = <-a.Srv.Store.Post().Save(post)
|
||||||
if result.Err != nil {
|
if result.Err != nil {
|
||||||
return nil, result.Err
|
return nil, result.Err
|
||||||
|
|||||||
@@ -261,8 +261,6 @@ func (a *App) CreateWebhookPost(userId string, channel *model.Channel, text, ove
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mlog.Debug(model.StringInterfaceToJson(post.Props))
|
|
||||||
|
|
||||||
if len(props) > 0 {
|
if len(props) > 0 {
|
||||||
for key, val := range props {
|
for key, val := range props {
|
||||||
if key == "attachments" {
|
if key == "attachments" {
|
||||||
@@ -275,15 +273,12 @@ func (a *App) CreateWebhookPost(userId string, channel *model.Channel, text, ove
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mlog.Debug(model.StringInterfaceToJson(post.Props))
|
|
||||||
|
|
||||||
splits, err := SplitWebhookPost(post, a.MaxPostSize())
|
splits, err := SplitWebhookPost(post, a.MaxPostSize())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, split := range splits {
|
for _, split := range splits {
|
||||||
mlog.Debug(model.StringInterfaceToJson(split.Props))
|
|
||||||
if _, err := a.CreatePostMissingChannel(split, false); err != nil {
|
if _, err := a.CreatePostMissingChannel(split, false); err != nil {
|
||||||
return nil, model.NewAppError("CreateWebhookPost", "api.post.create_webhook_post.creating.app_error", nil, "err="+err.Message, http.StatusInternalServerError)
|
return nil, model.NewAppError("CreateWebhookPost", "api.post.create_webhook_post.creating.app_error", nil, "err="+err.Message, http.StatusInternalServerError)
|
||||||
}
|
}
|
||||||
@@ -606,16 +601,13 @@ func (a *App) HandleIncomingWebhook(hookId string, req *model.IncomingWebhookReq
|
|||||||
|
|
||||||
req.Props["webhook_display_name"] = hook.DisplayName
|
req.Props["webhook_display_name"] = hook.DisplayName
|
||||||
|
|
||||||
mlog.Debug(req.ToJson())
|
|
||||||
text = a.ProcessSlackText(text)
|
text = a.ProcessSlackText(text)
|
||||||
req.Attachments = a.ProcessSlackAttachments(req.Attachments)
|
req.Attachments = a.ProcessSlackAttachments(req.Attachments)
|
||||||
mlog.Debug(req.ToJson())
|
|
||||||
// attachments is in here for slack compatibility
|
// attachments is in here for slack compatibility
|
||||||
if len(req.Attachments) > 0 {
|
if len(req.Attachments) > 0 {
|
||||||
req.Props["attachments"] = req.Attachments
|
req.Props["attachments"] = req.Attachments
|
||||||
webhookType = model.POST_SLACK_ATTACHMENT
|
webhookType = model.POST_SLACK_ATTACHMENT
|
||||||
}
|
}
|
||||||
mlog.Debug(model.StringInterfaceToJson(req.Props))
|
|
||||||
|
|
||||||
var channel *model.Channel
|
var channel *model.Channel
|
||||||
var cchan store.StoreChannel
|
var cchan store.StoreChannel
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user