fix: fix convo volatile updates for 03-groups

pull/2963/head
Audric Ackermann 2 years ago
parent 1b50715e8f
commit 528d15bf2d

@ -919,7 +919,27 @@ async function handleConvoInfoVolatileUpdate() {
break; break;
case 'Group': case 'Group':
// debugger; // we need to update the current read messages of that group 03 with what we have in the wrapper // debugger try {
const groupsV2 = await ConvoInfoVolatileWrapperActions.getAllGroups();
for (let index = 0; index < groupsV2.length; index++) {
const fromWrapper = groupsV2[index];
try {
await applyConvoVolatileUpdateFromWrapper(
fromWrapper.pubkeyHex,
fromWrapper.unread,
fromWrapper.lastRead
);
} catch (e) {
window.log.warn(
'handleConvoInfoVolatileUpdate of "Group" failed with error: ',
e.message
);
}
}
} catch (e) {
window.log.warn('getAllGroups of "Group" failed with error: ', e.message);
}
break; break;
default: default:

@ -309,7 +309,7 @@ async function removeContactFromWrapper(convoId: string) {
* whole other bunch of issues because it is a native node module. * whole other bunch of issues because it is a native node module.
*/ */
function getConvoInfoVolatileTypes(): Array<ConvoVolatileType> { function getConvoInfoVolatileTypes(): Array<ConvoVolatileType> {
return ['1o1', 'LegacyGroup', 'Community']; return ['1o1', 'LegacyGroup', 'Group', 'Community'];
} }
export const SessionUtilConvoInfoVolatile = { export const SessionUtilConvoInfoVolatile = {

Loading…
Cancel
Save