Преглед изворни кода

Push notifications privacy issue - https://github.com/unaio/una/issues/2503

Alex Trofimov пре 6 година
родитељ
комит
57b2abb187
1 измењених фајлова са 7 додато и 1 уклоњено
  1. 7 1
      App.js

+ 7 - 1
App.js

@@ -304,8 +304,14 @@ export default class App extends Component<Props> {
             });
         }
         
-        if ('undefined' !== typeof(oMsgData['push_tags']))
+        if ('undefined' !== typeof(oMsgData['push_tags'])) {
+            if ('undefined' !== typeof(oMsgData['push_tags']['email'])) {
+                OneSignal.setEmail(oMsgData['push_tags']['email'], oMsgData['push_tags']['email_hash']);
+                delete oMsgData['push_tags']['email'];
+                delete oMsgData['push_tags']['email_hash'];
+            }
             OneSignal.sendTags(oMsgData['push_tags']);
+        }
 
         if ('undefined' !== typeof(oMsgData['stop_loading']) && oMsgData['stop_loading']) {
             this.onWebViewLoadEnd (event);