feat: Add clear cache command
This commit is contained in:
parent
5da0180f1f
commit
921c694888
|
|
@ -215,6 +215,10 @@ extension CommandsClientExtension on Client {
|
|||
.clearOrUseOutboundGroupSession(args.room.id, wipe: true);
|
||||
return '';
|
||||
});
|
||||
addCommand('clearcache', (CommandArgs args) async {
|
||||
await clearCache();
|
||||
return '';
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -311,6 +311,11 @@ void main() {
|
|||
}
|
||||
});
|
||||
|
||||
test('create', () async {
|
||||
await room.sendTextEvent('/clearcache');
|
||||
expect(room.client.prevBatch, null);
|
||||
});
|
||||
|
||||
test('dispose client', () async {
|
||||
await client.dispose(closeDatabase: true);
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue