Fetch latest group data on unblock of a group

This commit is contained in:
Scott Nonnenberg 2022-06-20 11:55:34 -07:00 committed by GitHub
parent 7dd9cabbbd
commit d547ef362e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 1 deletions

View file

@ -971,6 +971,8 @@ export class ConversationModel extends window.Backbone
if (!viaStorageServiceSync) { if (!viaStorageServiceSync) {
this.captureChange('unblock'); this.captureChange('unblock');
} }
this.fetchLatestGroupV2Data({ force: true });
} }
return unblocked; return unblocked;

View file

@ -2,8 +2,11 @@
// SPDX-License-Identifier: AGPL-3.0-only // SPDX-License-Identifier: AGPL-3.0-only
import { debounce } from 'lodash'; import { debounce } from 'lodash';
import type { MessageModel } from '../models/messages'; import type { MessageModel } from '../models/messages';
import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary'; import { clearTimeoutIfNecessary } from '../util/clearTimeoutIfNecessary';
import { sleep } from '../util/sleep';
import { SECOND } from '../util/durations';
class ExpiringMessagesDeletionService { class ExpiringMessagesDeletionService {
public update: typeof this.checkExpiringMessages; public update: typeof this.checkExpiringMessages;
@ -60,9 +63,15 @@ class ExpiringMessagesDeletionService {
'destroyExpiredMessages: Error deleting expired messages', 'destroyExpiredMessages: Error deleting expired messages',
error && error.stack ? error.stack : error error && error.stack ? error.stack : error
); );
window.SignalContext.log.info(
'destroyExpiredMessages: Waiting 30 seconds before trying again'
);
await sleep(30 * SECOND);
} }
window.SignalContext.log.info('destroyExpiredMessages: complete'); window.SignalContext.log.info(
'destroyExpiredMessages: done, scheduling another check'
);
this.update(); this.update();
} }