fix: cleanup legacy groups

pull/2971/head
William Grant 2 years ago
parent b14d05e0b2
commit b1bbcd1a38

@ -634,22 +634,6 @@ async function handleLegacyGroupUpdate(latestEnvelopeTimestamp: number) {
changes = true;
}
// if (legacyGroupConvo.get('expireTimer') !== fromWrapper.disappearingTimerSeconds) {
// // TODO Not sure about this
// await legacyGroupConvo.updateExpireTimer({
// providedExpirationType:
// !!fromWrapper.disappearingTimerSeconds && fromWrapper.disappearingTimerSeconds === 0
// ? 'off'
// : 'deleteAfterSend',
// providedExpireTimer: fromWrapper.disappearingTimerSeconds,
// shouldCommit: false,
// fromSync: true,
// providedChangeTimestamp: latestEnvelopeTimestamp,
// fromConfigMessage: true,
// });
// changes = true;
// }
// start polling for this group if we haven't left it yet. The wrapper does not store this info for legacy group so we check from the DB entry instead
if (!legacyGroupConvo.get('isKickedFromGroup') && !legacyGroupConvo.get('left')) {
getSwarmPollingInstance().addGroupId(PubKey.cast(fromWrapper.pubkeyHex));

@ -249,8 +249,6 @@ export async function updateOrCreateClosedGroup(details: GroupInfo, fromLegacyCo
await conversation.updateGroupAdmins(details.admins, false);
}
await conversation.commit();
await conversation.updateExpireTimer({
// TODO legacy messages support will be removed in a future release
providedExpirationType:
@ -262,6 +260,8 @@ export async function updateOrCreateClosedGroup(details: GroupInfo, fromLegacyCo
fromSync: true,
fromConfigMessage: Boolean(fromLegacyConfig),
});
await conversation.commit();
}
async function sendNewName(convo: ConversationModel, name: string, messageId: string) {

Loading…
Cancel
Save