aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Profile
diff options
context:
space:
mode:
authorCarl Schwan <carl@carlschwan.eu>2022-11-21 16:44:55 +0100
committerCarl Schwan <carl@carlschwan.eu>2022-11-22 08:40:12 +0100
commitd1209d83023aaae7b844f4fc3b3668643718de14 (patch)
treeffb2682d6cde4542a2e8eec34604759e8669c323 /lib/private/Profile
parentd847eacfbde90a2d4532f9c541d427be17b078bd (diff)
downloadnextcloud-server-d1209d83023aaae7b844f4fc3b3668643718de14.tar.gz
nextcloud-server-d1209d83023aaae7b844f4fc3b3668643718de14.zip
Rename mastodon to fediverse
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'lib/private/Profile')
-rw-r--r--lib/private/Profile/Actions/FediverseAction.php (renamed from lib/private/Profile/Actions/MastodonAction.php)10
-rw-r--r--lib/private/Profile/ProfileManager.php4
2 files changed, 7 insertions, 7 deletions
diff --git a/lib/private/Profile/Actions/MastodonAction.php b/lib/private/Profile/Actions/FediverseAction.php
index c6c9bc6ade7..ed3fcd80b52 100644
--- a/lib/private/Profile/Actions/MastodonAction.php
+++ b/lib/private/Profile/Actions/FediverseAction.php
@@ -33,7 +33,7 @@ use OCP\IUser;
use OCP\L10N\IFactory;
use OCP\Profile\ILinkAction;
-class MastodonAction implements ILinkAction {
+class FediverseAction implements ILinkAction {
private ?string $value = null;
private IAccountManager $accountManager;
private IFactory $l10nFactory;
@@ -51,7 +51,7 @@ class MastodonAction implements ILinkAction {
public function preload(IUser $targetUser): void {
$account = $this->accountManager->getAccount($targetUser);
- $this->value = $account->getProperty(IAccountManager::PROPERTY_MASTODON)->getValue();
+ $this->value = $account->getProperty(IAccountManager::PROPERTY_FEDIVERSE)->getValue();
}
public function getAppId(): string {
@@ -59,16 +59,16 @@ class MastodonAction implements ILinkAction {
}
public function getId(): string {
- return IAccountManager::PROPERTY_MASTODON;
+ return IAccountManager::PROPERTY_FEDIVERSE;
}
public function getDisplayId(): string {
- return $this->l10nFactory->get('lib')->t('Mastodon');
+ return $this->l10nFactory->get('lib')->t('Fediverse');
}
public function getTitle(): string {
$displayUsername = $this->value[0] === '@' ? $this->value : '@' . $this->value;
- return $this->l10nFactory->get('lib')->t('View %s on Mastodon', [$displayUsername]);
+ return $this->l10nFactory->get('lib')->t('View %s on the fediverse', [$displayUsername]);
}
public function getPriority(): int {
diff --git a/lib/private/Profile/ProfileManager.php b/lib/private/Profile/ProfileManager.php
index 35cb8c20fa9..ab1af1c1c16 100644
--- a/lib/private/Profile/ProfileManager.php
+++ b/lib/private/Profile/ProfileManager.php
@@ -35,7 +35,7 @@ use OC\KnownUser\KnownUserService;
use OC\Profile\Actions\EmailAction;
use OC\Profile\Actions\PhoneAction;
use OC\Profile\Actions\TwitterAction;
-use OC\Profile\Actions\MastodonAction;
+use OC\Profile\Actions\FediverseAction;
use OC\Profile\Actions\WebsiteAction;
use OCP\Accounts\IAccountManager;
use OCP\Accounts\PropertyDoesNotExistException;
@@ -96,7 +96,7 @@ class ProfileManager {
PhoneAction::class,
WebsiteAction::class,
TwitterAction::class,
- MastodonAction::class,
+ FediverseAction::class,
];
/**