Skip to content

Commit

Permalink
Cloud MS Teams now using remote cfg (#1304)
Browse files Browse the repository at this point in the history
  • Loading branch information
huseyinbabal authored Oct 31, 2023
1 parent 5c7ba65 commit 710e768
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions pkg/bot/teams_cloud_grpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import (
"github.com/kubeshop/botkube/internal/config/remote"
"github.com/kubeshop/botkube/pkg/api/cloudplatform"
pb "github.com/kubeshop/botkube/pkg/api/cloudteams"
"github.com/kubeshop/botkube/pkg/config"
)

type grpcCloudTeamsConnector struct {
Expand All @@ -30,10 +31,10 @@ type grpcCloudTeamsConnector struct {
}

func newGrpcCloudTeamsConnector(log logrus.FieldLogger, url string) (*grpcCloudTeamsConnector, error) {
remoteConfig, _ := remote.GetConfig()
//if !ok { TODO: enable when config generator will work
// return nil, fmt.Errorf("while getting remote config for %q", config.CloudTeamsCommPlatformIntegration)
//}
remoteConfig, ok := remote.GetConfig()
if !ok {
return nil, fmt.Errorf("while getting remote config for %q", config.CloudTeamsCommPlatformIntegration)
}
creds := grpc.WithTransportCredentials(insecure.NewCredentials())
opts := []grpc.DialOption{
creds,
Expand Down Expand Up @@ -81,8 +82,7 @@ func (c *grpcCloudTeamsConnector) Start(ctx context.Context) error {

err = activityClient.Send(&pb.AgentActivity{
Req: &pb.AgentActivity_InstanceId{
//InstanceId: c.remoteConfig.Identifier, // TODO: enable when config generator will work
InstanceId: "foo-123",
InstanceId: c.remoteConfig.Identifier,
},
})
if err != nil {
Expand Down

0 comments on commit 710e768

Please sign in to comment.