Avoid counting top channel posts for posts made by plugins and OAuth apps (#20943)
* add from_integration prop to oauth posts to: - oauth app posts - plugin posts - slash command responses - incoming webhook posts * tests * include check for bot posts * use from_plugin and from_oauth_app props * fix test * avoid counting top channel posts for posts made by plugins and oauth apps
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
3e4c44c478
Коммит
15b5b1c191
@@ -630,6 +630,8 @@ func (api *PluginAPI) GetGroupsForUser(userID string) ([]*model.Group, *model.Ap
|
||||
}
|
||||
|
||||
func (api *PluginAPI) CreatePost(post *model.Post) (*model.Post, *model.AppError) {
|
||||
post.AddProp("from_plugin", "true")
|
||||
|
||||
post, appErr := api.app.CreatePostMissingChannel(api.ctx, post, true)
|
||||
if post != nil {
|
||||
post = post.ForPlugin()
|
||||
|
||||
Ссылка в новой задаче
Block a user