diff --git a/lib/AppInfo/Capabilities.php b/lib/AppInfo/Capabilities.php index b83f6e0b2..3c1b942f4 100644 --- a/lib/AppInfo/Capabilities.php +++ b/lib/AppInfo/Capabilities.php @@ -8,6 +8,7 @@ namespace OCA\GroupFolders\AppInfo; use OCA\GroupFolders\Folder\FolderManager; +use OCP\App\IAppManager; use OCP\Capabilities\ICapability; use OCP\IUser; use OCP\IUserSession; @@ -15,10 +16,12 @@ class Capabilities implements ICapability { private IUserSession $userSession; private FolderManager $folderManager; + private IAppManager $appManager; - public function __construct(IUserSession $userSession, FolderManager $folderManager) { + public function __construct(IUserSession $userSession, FolderManager $folderManager, IAppManager $appManager) { $this->userSession = $userSession; $this->folderManager = $folderManager; + $this->appManager = $appManager; } public function getCapabilities(): array { @@ -28,6 +31,7 @@ public function getCapabilities(): array { } return [ Application::APP_ID => [ + 'appVersion' => $this->appManager->getAppVersion(Application::APP_ID), 'hasGroupFolders' => $this->hasFolders($user), ], ];