Performed two different tests:
1. Manually tested the code that updated `threadInfos`:
```
const threadStore = { ... } // threadStore contents here
const updatedThreadInfos = {};
const threadInfos = threadStore.threadInfos;
for (const threadID in threadInfos) {
const threadInfo = threadInfos[threadID];
const { roles } = threadInfo;
const updatedRoles = {};
for (const roleID in roles) {
const role = roles[roleID];
const { permissions: rolePermissions } = role;
const updatedPermissions = {};
for (const permission in rolePermissions) {
if (permission !== 'descendant_open_voiced') {
updatedPermissions[permission] = rolePermissions[permission];
}
}
updatedRoles[roleID] = { ...role, permissions: updatedPermissions };
}
const updatedThreadInfo = {
...threadInfo,
roles: updatedRoles,
};
// Nothing should log here (testing: nothing logs)
for (const roleID in updatedRoles) {
const role = updatedRoles[roleID];
const { permissions: rolePermissions } = role;
for (const permission in rolePermissions) {
if (permission === 'descendant_open_voiced') {
console.log('descendant_open_voiced', roleID);
}
}
}
updatedThreadInfos[threadID] = updatedThreadInfo;
}
```
2. Confirmed the results of the migration itself:
-- Open `native` and run `yarn redux-devtools` to inspect `threadStore`
-- Verified that some roles had the `descendant_open_voiced` permission
-- Upgraded the persist version to trigger the migration
-- Confirmed that the migration succeeded
-- Checked the redux devtools for the same roles and confirmed that there was one less permission (introspecting into the permissions confirmed that `descendant_open_voiced` was removed
-- Waited a few minutes and confirmed that the client did not detect any inconsistencies