MM-59360 add telemetry for paid features related to guests (#28295)
* add telemetry for paid features related to guests --------- Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
18388a8c64
Коммит
662e59865c
@@ -13,6 +13,7 @@ import (
|
||||
"strings"
|
||||
|
||||
"github.com/mattermost/mattermost/server/v8/channels/utils"
|
||||
"github.com/mattermost/mattermost/server/v8/platform/services/telemetry"
|
||||
|
||||
"github.com/mattermost/mattermost/server/public/model"
|
||||
"github.com/mattermost/mattermost/server/public/plugin"
|
||||
@@ -1568,6 +1569,13 @@ func (a *App) addUserToChannel(c request.CTX, user *model.User, channel *model.C
|
||||
return nil, model.NewAppError("AddUserToChannel", "app.channel_member_history.log_join_event.internal_error", nil, "", http.StatusInternalServerError).Wrap(nErr)
|
||||
}
|
||||
|
||||
if user.IsGuest() {
|
||||
a.Srv().telemetryService.SendTelemetryForFeature(
|
||||
telemetry.TrackGuestFeature,
|
||||
"add_guest_to_channel",
|
||||
map[string]any{"user_actual_id": user.Id})
|
||||
}
|
||||
|
||||
a.Srv().Platform().InvalidateChannelCacheForUser(user.Id)
|
||||
a.invalidateCacheForChannelMembers(channel.Id)
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user