kopia lustrzana https://github.com/nextcloud/social
getUrlSocial would work on custom apps folder
Signed-off-by: Maxence Lange <maxence@artificial-owl.com>pull/388/head
rodzic
dc3e04e2e4
commit
e8fd2c1d61
|
@ -242,6 +242,7 @@ class ConfigService {
|
|||
return $this->config->getSystemValue($key, '');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param string $cloudAddress
|
||||
*/
|
||||
|
@ -277,13 +278,17 @@ class ConfigService {
|
|||
|
||||
|
||||
/**
|
||||
* // TODO - check the Apps folder
|
||||
* @param string $path
|
||||
*
|
||||
* @return string
|
||||
* @throws SocialAppConfigException
|
||||
*/
|
||||
public function getUrlSocial(): string {
|
||||
return $this->getCloudAddress() . '/apps/social/';
|
||||
public function getUrlSocial(string $path = ''): string {
|
||||
if ($path === '') {
|
||||
$path = $this->urlGenerator->linkToRoute('social.Navigation.navigate');
|
||||
}
|
||||
|
||||
return 'https://' . $this->getCloudAddress(true) . $path;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -68,8 +68,9 @@ try {
|
|||
exit;
|
||||
}
|
||||
|
||||
$href =
|
||||
$urlGenerator->linkToRouteAbsolute('social.ActivityPub.actorAlias', ['username' => $username]);
|
||||
$href = $configService->getUrlSocial(
|
||||
$urlGenerator->linkToRoute('social.ActivityPub.actorAlias', ['username' => $username])
|
||||
);
|
||||
|
||||
if (substr($href, -1) === '/') {
|
||||
$href = substr($href, 0, -1);
|
||||
|
|
Ładowanie…
Reference in New Issue