@@ -474,7 +474,7 @@ function uploadFile(myfile, id, callback) {
474474 params . app_user = params . app_user || { } ;
475475
476476 var user = JSON . parse ( JSON . stringify ( params . app_user ) ) ;
477- common . db . collection ( 'feedback_widgets' ) . find ( { "app_id" : params . app_id + "" , "status" : true , type : "rating" } , { _id : 1 , popup_header_text : 1 , cohortID : 1 , type : 1 , appearance : 1 , showPolicy : 1 , trigger_position : 1 , hide_sticker : 1 , trigger_bg_color : 1 , trigger_font_color : 1 , trigger_button_text : 1 , trigger_size : 1 , target_pages : 1 } ) . toArray ( function ( err , widgets ) {
477+ common . db . collection ( 'feedback_widgets' ) . find ( { "app_id" : params . app_id + "" , "status" : true , type : "rating" } , { _id : 1 , popup_header_text : 1 , cohortID : 1 , type : 1 , appearance : 1 , showPolicy : 1 , trigger_position : 1 , hide_sticker : 1 , trigger_bg_color : 1 , trigger_font_color : 1 , trigger_button_text : 1 , trigger_size : 1 , target_pages : 1 , wv : 1 } ) . toArray ( function ( err , widgets ) {
478478 if ( err ) {
479479 log . e ( err ) ;
480480 reject ( err ) ;
@@ -492,6 +492,7 @@ function uploadFile(myfile, id, callback) {
492492 }
493493 widget . tg = widget . target_pages ;
494494 widget . name = widget . popup_header_text ;
495+ widget . wv = widget . wv ?. toString ( ) || null ;
495496 // remove this props from response
496497 delete widget . hide_sticker ;
497498 delete widget . trigger_position ;
@@ -565,6 +566,11 @@ function uploadFile(myfile, id, callback) {
565566 phone : true ,
566567 tablet : true
567568 } ;
569+ /**
570+ * NOTE: This property is used to help SDK identify if the widget has the new handling for close button and
571+ * allows widget to be fullscreen. Since the server will support this from here on, it can be hardcoded.
572+ */
573+ widget . wv = 1 ;
568574
569575 //widget.created_by = common.db.ObjectID(obParams.member._id);
570576 validateCreate ( obParams , FEATURE_NAME , function ( params ) {
0 commit comments