Support webapp to render post rapidly for bot without additional call for user/bot. (#10793)

Этот коммит содержится в:
scott lee davis
2019-05-10 08:04:52 -07:00
коммит произвёл Harrison Healey
родитель 53d0bfe35e
Коммит 74c7c46a7d

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

@@ -166,6 +166,10 @@ func (a *App) CreatePost(post *model.Post, channel *model.Channel, triggerWebhoo
return nil, err
}
if user.IsBot {
post.AddProp("from_bot", "true")
}
if a.License() != nil && *a.Config().TeamSettings.ExperimentalTownSquareIsReadOnly &&
!post.IsSystemMessage() &&
channel.Name == model.DEFAULT_CHANNEL &&