@@ -43,7 +43,7 @@ use ripple_sdk::{
4343 firebolt:: {
4444 fb_capabilities:: FireboltCap ,
4545 fb_discovery:: {
46- AgePolicy , LaunchRequest , DISCOVERY_EVENT_ON_NAVIGATE_TO , ENTITY_INFO_CAPABILITY ,
46+ LaunchRequest , DISCOVERY_EVENT_ON_NAVIGATE_TO , ENTITY_INFO_CAPABILITY ,
4747 ENTITY_INFO_EVENT , EVENT_DISCOVERY_POLICY_CHANGED , PURCHASED_CONTENT_CAPABILITY ,
4848 PURCHASED_CONTENT_EVENT ,
4949 } ,
@@ -265,14 +265,7 @@ impl DiscoveryServer for DiscoveryImpl {
265265 . get_features ( )
266266 . intent_validation ;
267267 validate_navigation_intent ( intent_validation_config, request. intent . clone ( ) ) . await ?;
268- let policy_ids = self
269- . state
270- . policy_state
271- . policy_identifiers_alias
272- . read ( )
273- . unwrap ( )
274- . clone ( ) ;
275- let req_updated_source = update_intent ( ctx. app_id . clone ( ) , policy_ids, request. clone ( ) ) ;
268+ let req_updated_source = update_intent ( ctx. app_id . clone ( ) , request. clone ( ) ) ;
276269 info ! (
277270 "Discovery.launch: req_updated_source: {:?}" ,
278271 & req_updated_source
@@ -528,72 +521,48 @@ impl DiscoveryServer for DiscoveryImpl {
528521 Ok ( true )
529522 }
530523}
531- fn update_intent (
532- source : String ,
533- policy_ids : Vec < AgePolicy > ,
534- request : LaunchRequest ,
535- ) -> LaunchRequest {
536- let age_policy = policy_ids
537- . into_iter ( )
538- . map ( |p| p. as_string ( ) . to_string ( ) )
539- . collect :: < Vec < String > > ( ) ;
540- let new_age_policy: Option < Vec < String > > = if age_policy. is_empty ( ) {
541- None
542- } else {
543- Some ( age_policy)
544- } ;
545-
524+ fn update_intent ( source : String , request : LaunchRequest ) -> LaunchRequest {
546525 match request. intent . clone ( ) {
547526 Some ( NavigationIntent :: NavigationIntentStrict ( navigation_intent) ) => {
548527 let updated_navigation_intent = match navigation_intent {
549528 NavigationIntentStrict :: Home ( mut home_intent) => {
550529 home_intent. context . source = source;
551- home_intent. context . age_policy = new_age_policy;
552530 NavigationIntentStrict :: Home ( home_intent)
553531 }
554532 NavigationIntentStrict :: Launch ( mut launch_intent) => {
555533 launch_intent. context . source = source;
556- launch_intent. context . age_policy = new_age_policy;
557534 NavigationIntentStrict :: Launch ( launch_intent)
558535 }
559536 NavigationIntentStrict :: Entity ( mut entity_intent) => {
560537 entity_intent. context . source = source;
561- entity_intent. context . age_policy = new_age_policy;
562538 NavigationIntentStrict :: Entity ( entity_intent)
563539 }
564540 NavigationIntentStrict :: Playback ( mut playback_intent) => {
565541 playback_intent. context . source = source;
566- playback_intent. context . age_policy = new_age_policy;
567542 NavigationIntentStrict :: Playback ( playback_intent)
568543 }
569544 NavigationIntentStrict :: Search ( mut search_intent) => {
570545 search_intent. context . source = source;
571- search_intent. context . age_policy = new_age_policy;
572546 NavigationIntentStrict :: Search ( search_intent)
573547 }
574548 NavigationIntentStrict :: Section ( mut section_intent) => {
575549 section_intent. context . source = source;
576- section_intent. context . age_policy = new_age_policy;
577550 NavigationIntentStrict :: Section ( section_intent)
578551 }
579552 NavigationIntentStrict :: Tune ( mut tune_intent) => {
580553 tune_intent. context . source = source;
581- tune_intent. context . age_policy = new_age_policy;
582554 NavigationIntentStrict :: Tune ( tune_intent)
583555 }
584556 NavigationIntentStrict :: ProviderRequest ( mut provider_request_intent) => {
585557 provider_request_intent. context . source = source;
586- provider_request_intent. context . age_policy = new_age_policy;
587558 NavigationIntentStrict :: ProviderRequest ( provider_request_intent)
588559 }
589560 NavigationIntentStrict :: PlayEntity ( mut p) => {
590561 p. context . source = source;
591- p. context . age_policy = new_age_policy;
592562 NavigationIntentStrict :: PlayEntity ( p)
593563 }
594564 NavigationIntentStrict :: PlayQuery ( mut p) => {
595565 p. context . source = source;
596- p. context . age_policy = new_age_policy;
597566 NavigationIntentStrict :: PlayQuery ( p)
598567 }
599568 } ;
@@ -607,7 +576,6 @@ fn update_intent(
607576 }
608577 Some ( NavigationIntent :: NavigationIntentLoose ( mut loose_intent) ) => {
609578 loose_intent. context . source = source;
610- loose_intent. context . age_policy = new_age_policy;
611579 LaunchRequest {
612580 app_id : request. app_id ,
613581 intent : Some ( NavigationIntent :: NavigationIntentLoose ( loose_intent) ) ,
0 commit comments