We need to store device_token on web so we can save push service endpoints and auth info. This diff make deviceToken a proper field in web redux and enables the web app to set it's device token on keyserver. I've removed isDeviceType checks in places where previously we skipped handling deviceToken for the web platform.
Details
Details
Tested with the next diffs in stack that set the device_token:
- check that the device_token is correctly set in the database and in the redux on web
- check that after logging out the device_token is assigned to an anonymous cookie
- check that after another user logs in they get the device's device_token
Diff Detail
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
lib/utils/sanitization.js | ||
---|---|---|
303 | This is changed for flow because no WebAppState also contains a deviceToken so we don't know if it's NativeAppState or WebAppState |
web/redux/device-token.reducer.js | ||
---|---|---|
1 |
| |
web/redux/redux-setup.js | ||
202 | This could be in baseReducer I think |
Comment Actions
Moved the code for the device token reducer to lib in a previous diff. Moved the device token to BaseAppState and reduce it in the baseReducer.