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
@@ -203,6 +203,10 @@ func (a *App) CreatePost(c request.CTX, post *model.Post, channel *model.Channel
|
||||
post.AddProp("from_bot", "true")
|
||||
}
|
||||
|
||||
if c.Session().IsOAuth {
|
||||
post.AddProp("from_oauth_app", "true")
|
||||
}
|
||||
|
||||
var ephemeralPost *model.Post
|
||||
if post.Type == "" && !a.HasPermissionToChannel(c, user.Id, channel.Id, model.PermissionUseChannelMentions) {
|
||||
mention := post.DisableMentionHighlights()
|
||||
|
||||
Ссылка в новой задаче
Block a user