3030use OCA \Theming \ThemingDefaults ;
3131use OCA \Theming \Util ;
3232use OCP \IConfig ;
33+ use OCP \IUserSession ;
3334
3435class JSDataService implements \JsonSerializable {
3536 private ThemingDefaults $ themingDefaults ;
3637 private Util $ util ;
3738 private IConfig $ appConfig ;
39+ private IUserSession $ userSession ;
3840 private ThemesService $ themesService ;
3941
4042 public function __construct (
4143 ThemingDefaults $ themingDefaults ,
4244 Util $ util ,
4345 IConfig $ appConfig ,
46+ IUserSession $ userSession ,
4447 ThemesService $ themesService
4548 ) {
4649 $ this ->themingDefaults = $ themingDefaults ;
4750 $ this ->util = $ util ;
4851 $ this ->appConfig = $ appConfig ;
52+ $ this ->userSession = $ userSession ;
4953 $ this ->themesService = $ themesService ;
5054 }
5155
@@ -60,6 +64,7 @@ public function jsonSerialize(): array {
6064 'privacyUrl ' => $ this ->themingDefaults ->getPrivacyUrl (),
6165 'inverted ' => $ this ->util ->invertTextColor ($ this ->themingDefaults ->getColorPrimary ()),
6266 'cacheBuster ' => $ this ->appConfig ->getAppValue (Application::APP_ID , 'cachebuster ' , '0 ' ),
67+ 'userCacheBuster ' => $ this ->util ->getUserCacheBuster (Application::APP_ID , $ this ->appConfig , $ this ->userSession ),
6368 'enabledThemes ' => $ this ->themesService ->getEnabledThemes (),
6469 ];
6570 }
0 commit comments