Skip to content

Commit

Permalink
Fixing other tracked events
Browse files Browse the repository at this point in the history
  • Loading branch information
jespino committed Jul 4, 2024
1 parent a017f80 commit 1ab2d40
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
15 changes: 3 additions & 12 deletions server/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,12 +260,9 @@ func (p *Plugin) handleMentions(bot *Bot, post *model.Post, postingUser *model.U
}

p.track(evAIBotMention, map[string]interface{}{
"user_id": postingUser.Id,
"actual_user_id": postingUser.Id,
"bot_id": bot.mmBot.UserId,
"bot_service_type": bot.cfg.Service.Type,
"feature": map[string]string{
"name": "AI",
},
})

if err := p.processUserRequestToBot(bot, p.MakeConversationContext(bot, postingUser, channel, post)); err != nil {
Expand All @@ -282,21 +279,15 @@ func (p *Plugin) handleDMs(bot *Bot, channel *model.Channel, postingUser *model.

if post.RootId == "" {
p.track(evUserStartedConversation, map[string]interface{}{
"user_id": postingUser.Id,
"user_actual_id": postingUser.Id,
"bot_id": bot.mmBot.UserId,
"bot_service_type": bot.cfg.Service.Type,
"feature": map[string]string{
"name": "AI",
},
})
} else {
p.track(evContextualInterrogation, map[string]interface{}{
"user_id": postingUser.Id,
"user_actual_id": postingUser.Id,
"bot_id": bot.mmBot.UserId,
"bot_service_type": bot.cfg.Service.Type,
"feature": map[string]string{
"name": "AI",
},
})
}

Expand Down
2 changes: 0 additions & 2 deletions server/telemetry.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,6 @@ var (
// We only need to map events that require a SKU (i.e., licensed features). Anything available on unlicensed
// servers will map to null as expected.
eventToSkusMap = map[string][]string{
evUserStartedConversation: enterpriseSKUs,
evContextualInterrogation: enterpriseSKUs,
evSummarizeUnreadMessages: enterpriseSKUs,
evSummarizeThread: enterpriseSKUs,
evSummarizeTranscription: enterpriseSKUs,
Expand Down

0 comments on commit 1ab2d40

Please sign in to comment.