Fetch latest group data on unblock of a group
This commit is contained in:
parent
7dd9cabbbd
commit
d547ef362e
2 changed files with 12 additions and 1 deletions
|
@ -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;
|
||||||
|
|
|
@ -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();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue