diff --git a/api/proto/teleport/legacy/types/types.proto b/api/proto/teleport/legacy/types/types.proto index 0d410b75df46f..ef0ca58ace212 100644 --- a/api/proto/teleport/legacy/types/types.proto +++ b/api/proto/teleport/legacy/types/types.proto @@ -7556,7 +7556,7 @@ message IntegrationV1 { message IntegrationStatusV1 { // PendingUserTasksNotificationID contains the notification ID that indicates that this integration has unresolved user tasks. string PendingUserTasksNotificationID = 1 [(gogoproto.jsontag) = "pending_user_tasks_notification_id,omitempty"]; - // NeedsAttentionNotificationExpires contains the expiration date for the notification. + // PendingUserTasksNotificationExpires contains the expiration date for the notification. // Used to ensure new notifications' expiration is the greater between the current notification and the new one. google.protobuf.Timestamp PendingUserTasksNotificationExpires = 2 [ (gogoproto.stdtime) = true, diff --git a/api/types/types.pb.go b/api/types/types.pb.go index b83e6f4960898..4b6d455141239 100644 --- a/api/types/types.pb.go +++ b/api/types/types.pb.go @@ -20172,7 +20172,7 @@ var xxx_messageInfo_IntegrationV1 proto.InternalMessageInfo type IntegrationStatusV1 struct { // PendingUserTasksNotificationID contains the notification ID that indicates that this integration has unresolved user tasks. PendingUserTasksNotificationID string `protobuf:"bytes,1,opt,name=PendingUserTasksNotificationID,proto3" json:"pending_user_tasks_notification_id,omitempty"` - // NeedsAttentionNotificationExpires contains the expiration date for the notification. + // PendingUserTasksNotificationExpires contains the expiration date for the notification. // Used to ensure new notifications' expiration is the greater between the current notification and the new one. PendingUserTasksNotificationExpires *time.Time `protobuf:"bytes,2,opt,name=PendingUserTasksNotificationExpires,proto3,stdtime" json:"pending_user_tasks_notification_expires,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` diff --git a/lib/auth/usertasks/usertasksv1/service.go b/lib/auth/usertasks/usertasksv1/service.go index dd4def5371ba7..76833d964473f 100644 --- a/lib/auth/usertasks/usertasksv1/service.go +++ b/lib/auth/usertasks/usertasksv1/service.go @@ -438,8 +438,7 @@ func (s *Service) notifyUserAboutPendingTask(ctx context.Context, ut *usertasksv return trace.Wrap(err) } integrationStatus := integration.GetStatus() - existingNotification := integrationStatus.PendingUserTasksNotificationID - if existingNotification != "" { + if integrationStatus.PendingUserTasksNotificationID != "" { if err := s.backend.DeleteGlobalNotification(ctx, integrationStatus.PendingUserTasksNotificationID); err != nil { // NotFound might be returned when the GlobalNotification already expired or was deleted. if !trace.IsNotFound(err) {