Этот коммит содержится в:
Christopher Speller
2017-02-10 10:05:12 -05:00
коммит произвёл Corey Hulen
родитель 58dcf6984b
Коммит 2a9c1afd44
2 изменённых файлов: 6 добавлений и 0 удалений

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

@@ -12,6 +12,7 @@ import (
"strings"
l4g "github.com/alecthomas/log4go"
"github.com/mattermost/platform/einterfaces"
"github.com/mattermost/platform/model"
"github.com/mattermost/platform/utils"
)
@@ -126,6 +127,10 @@ func CreateWebhookPost(userId, teamId, channelId, text, overrideUsername, overri
post := &model.Post{UserId: userId, ChannelId: channelId, Message: text, Type: postType}
post.AddProp("from_webhook", "true")
if metrics := einterfaces.GetMetricsInterface(); metrics != nil {
metrics.IncrementWebhookPost()
}
if utils.Cfg.ServiceSettings.EnablePostUsernameOverride {
if len(overrideUsername) != 0 {
post.AddProp("override_username", overrideUsername)

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

@@ -8,6 +8,7 @@ type MetricsInterface interface {
StopServer()
IncrementPostCreate()
IncrementWebhookPost()
IncrementPostSentEmail()
IncrementPostSentPush()
IncrementPostBroadcast()