Skip to content

Commit 47385be

Browse files
committed
Clear generated avatar caches
Signed-off-by: jld3103 <[email protected]>
1 parent 0d4b5a7 commit 47385be

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

lib/private/Repair/ClearGeneratedAvatarCache.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ public function __construct(IConfig $config, AvatarManager $avatarManager, IJobL
4242
}
4343

4444
public function getName(): string {
45-
return 'Clear every generated avatar on major updates';
45+
return 'Clear every generated avatar';
4646
}
4747

4848
/**
@@ -51,8 +51,9 @@ public function getName(): string {
5151
private function shouldRun(): bool {
5252
$versionFromBeforeUpdate = $this->config->getSystemValueString('version', '0.0.0.0');
5353

54-
// was added to 25.0.0.10
55-
return version_compare($versionFromBeforeUpdate, '25.0.0.10', '<=');
54+
// This job only runs if the server was on a version lower than or equal to 27.0.0 before the upgrade.
55+
// To clear the avatar cache again, bump the version to the currently released version (and change the operator to <= if it's not the master branch) and wait for the next release.
56+
return version_compare($versionFromBeforeUpdate, '27.0.0', '<');
5657
}
5758

5859
public function run(IOutput $output): void {

tests/lib/Repair/ClearGeneratedAvatarCacheTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public function shouldRunDataProvider() {
6161
['15.0.0.3', true],
6262
['13.0.5.2', true],
6363
['12.0.0.0', true],
64-
['26.0.0.1', false],
64+
['26.0.0.1', true],
6565
['15.0.0.2', true],
6666
['13.0.0.0', true],
6767
['27.0.0.5', false]

0 commit comments

Comments
 (0)