Follow up to: https://phab.comm.dev/D5875#inline-39619, but even if data will not be sent and modal will be visible after refresh keyserver will inject data to html response - this change will prevent that.
Details
- Logout user
- Set terms policy as not accepted for user in DB
- Login via web app
- Refresh - data should not be present (empty app under modal, no data in redux)
- After accepting data should be fetched properly.
Diff Detail
- Repository
- rCOMM Comm
- Lint
No Lint Coverage - Unit
No Test Coverage
Event Timeline
keyserver/src/responders/website-responders.js | ||
---|---|---|
313 ↗ | (On Diff #20333) | You should start this promise way earlier, basically as soon as you can... otherwise it waits until other things complete (eg. assetInfoPromise) to start |
319–347 ↗ | (On Diff #20333) | This is messy. Instead, can you follow the existing convention and just update entryStorePromise, threadStorePromise, etc. to await the same fetchNotAcknowledgedPolicies promise, and return the correct results? Eg. take a look at how messageStorePromise depends on threadInfoPromise |
You need to brush up on Promises and async / await. Try to take some time and understand how the code in this file is written, and WHY it is written that way
keyserver/src/responders/website-responders.js | ||
---|---|---|
172–176 | Why are you awaiting this sequentially? | |
180 | Why are you awaiting this sequentially? | |
202 | Why are you awaiting this sequentially? | |
218 | Why are you awaiting this sequentially? | |
345 | Why are you awaiting this sequentially? |