Hardcode Talk namespace to fix install due to global route

Signed-off-by: Joas Schilling <coding@schilljs.com>
This commit is contained in:
Joas Schilling 2020-02-14 11:56:23 +01:00
parent f39786660c
commit 3894dcb756
No known key found for this signature in database
GPG Key ID: 7076EA9751AACDDA
1 changed files with 13 additions and 2 deletions

View File

@ -68,8 +68,19 @@ class App {
if (isset($appInfo['namespace'])) {
self::$nameSpaceCache[$appId] = trim($appInfo['namespace']);
} else {
// if the tag is not found, fall back to uppercasing the first letter
self::$nameSpaceCache[$appId] = ucfirst($appId);
if ($appId !== 'spreed') {
// if the tag is not found, fall back to uppercasing the first letter
self::$nameSpaceCache[$appId] = ucfirst($appId);
} else {
// For the Talk app (appid spreed) the above fallback doesn't work.
// This leads to a problem when trying to install it freshly,
// because the apps namespace is already registered before the
// app is downloaded from the appstore, because of the hackish
// global route index.php/call/{token} which is registered via
// the core/routes.php so it does not have the app namespace.
// @ref https://github.com/nextcloud/server/pull/19433
self::$nameSpaceCache[$appId] = 'Talk';
}
}
return $topNamespace . self::$nameSpaceCache[$appId];