{"action":"reopened","issue":{"url":"https://api.github.com/repos/invertase/react-native-firebase/issues/1149","repository_url":"https://api.github.com/repos/invertase/react-native-firebase","labels_url":"https://api.github.com/repos/invertase/react-native-firebase/issues/1149/labels{/name}","comments_url":"https://api.github.com/repos/invertase/react-native-firebase/issues/1149/comments","events_url":"https://api.github.com/repos/invertase/react-native-firebase/issues/1149/events","html_url":"https://github.com/invertase/react-native-firebase/issues/1149","id":326977412,"node_id":"MDU6SXNzdWUzMjY5Nzc0MTI=","number":1149,"title":"firebase.notifications().onNotificationOpened not working","user":{"login":"hapo-hoangnh","id":22829982,"node_id":"MDQ6VXNlcjIyODI5OTgy","avatar_url":"https://avatars1.githubusercontent.com/u/22829982?v=4","gravatar_id":"","url":"https://api.github.com/users/hapo-hoangnh","html_url":"https://github.com/hapo-hoangnh","followers_url":"https://api.github.com/users/hapo-hoangnh/followers","following_url":"https://api.github.com/users/hapo-hoangnh/following{/other_user}","gists_url":"https://api.github.com/users/hapo-hoangnh/gists{/gist_id}","starred_url":"https://api.github.com/users/hapo-hoangnh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hapo-hoangnh/subscriptions","organizations_url":"https://api.github.com/users/hapo-hoangnh/orgs","repos_url":"https://api.github.com/users/hapo-hoangnh/repos","events_url":"https://api.github.com/users/hapo-hoangnh/events{/privacy}","received_events_url":"https://api.github.com/users/hapo-hoangnh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":9,"created_at":"2018-05-28T10:25:05Z","updated_at":"2018-10-04T12:35:28Z","closed_at":null,"author_association":"NONE","body":"firebase.notifications().getInitialNotification() working when app closed, but firebase.notifications().onNotificationOpened not working when App in Foreground and background\r\nIOS: 9.1 (13B143)\r\ndocs: https://rnfirebase.io/docs/v4.2.x/notifications/receiving-notifications\r\n```\r\n  componentDidMount(){\r\n    firebase.notifications().getInitialNotification()\r\n      .then((notificationOpen: NotificationOpen) => {\r\n        if (notificationOpen) {\r\n          if (checkVariableExist(this.props.screenProps)) {\r\n            this.props.screenProps.navigate(\"NotificationsScreen\");\r\n          } else {\r\n            this.props.navigation.navigate(\"NotificationsScreen\");\r\n          }\r\n        }\r\n      });\r\n    this.notificationOpenedListener = firebase.notifications().onNotificationOpened((notificationOpen: NotificationOpen) => {\r\n      if(notificationOpen) {\r\n        if (checkVariableExist(this.props.screenProps)) {\r\n          this.props.screenProps.navigate(\"NotificationsScreen\");\r\n        } else {\r\n          this.props.navigation.navigate(\"NotificationsScreen\");\r\n        }\r\n      }\r\n    });\r\n  }\r\n\r\n  componentWillUnmount() {\r\n    this.notificationOpenedListener();\r\n  }\r\n```"}}
{"actor":{"display_login":"Salakar"}}