fix: iterate allRoominfos map correctly

testing complete
pull/2660/head
William Grant 2 years ago
parent 19025cd7e0
commit 462f96341e

@ -60,13 +60,12 @@ async function deleteEverythingAndNetworkData() {
// a bit of duplicate code below, but it's easier to follow every case like that (helped with returns) // a bit of duplicate code below, but it's easier to follow every case like that (helped with returns)
// clear all sogs inboxes (includes message requests) // clear all sogs inboxes (includes message requests)
const allRoomInfosMap = await getAllValidOpenGroupV2ConversationRoomInfos(); const allRoomInfos = await getAllValidOpenGroupV2ConversationRoomInfos();
if (allRoomInfosMap) { if (allRoomInfos && allRoomInfos.size > 0) {
const allRoomInfos = Object.values(allRoomInfosMap);
// clear each inbox per sogs // clear each inbox per sogs
for (let i = 0; i < allRoomInfos.length; i++) { for (const roomInfo of allRoomInfos.values()) {
// TODO CONTINUE testing - use a dummy account with some message requests and then if we restore from seed there should be no message requests. // TODO CONTINUE testing - use a dummy account with some message requests and then if we restore from seed there should be no message requests.
await clearInbox(allRoomInfos[i]); await clearInbox(roomInfo);
} }
} }

Loading…
Cancel
Save