diff --git a/app/team_test.go b/app/team_test.go index e281a1feaa..23fd15117b 100644 --- a/app/team_test.go +++ b/app/team_test.go @@ -102,7 +102,6 @@ func TestAddUserToTeam(t *testing.T) { }) t.Run("block user by domain but allow bot", func(t *testing.T) { - t.Skip("MM-48973") th.BasicTeam.AllowedDomains = "example.com" _, err := th.App.UpdateTeam(th.BasicTeam) require.Nil(t, err, "Should update the team") diff --git a/app/user.go b/app/user.go index 991457f7ba..b59774fd13 100644 --- a/app/user.go +++ b/app/user.go @@ -321,12 +321,14 @@ func (a *App) createUserOrGuest(c request.CTX, user *model.User, guest bool) (*m // table in CWS. This is then used to calculate how much the customers have to pay in addition for the extra users. If the // workspace is currently on a monthly plan, then this function will not do anything. - go func() { - _, err := a.SendSubscriptionHistoryEvent(ruser.Id) - if err != nil { - c.Logger().Error("Failed to create/update the SubscriptionHistoryEvent", mlog.Err(err)) - } - }() + if a.Channels().License().IsCloud() { + go func(userId string) { + _, err := a.SendSubscriptionHistoryEvent(userId) + if err != nil { + c.Logger().Error("Failed to create/update the SubscriptionHistoryEvent", mlog.Err(err)) + } + }(ruser.Id) + } return ruser, nil }