Remove confusing message during unfollow process
This commit is contained in:
parent
456ae169ab
commit
9e175ab319
|
@ -137,21 +137,14 @@ function unfollow_process(string $url)
|
||||||
// NOTREACHED
|
// NOTREACHED
|
||||||
}
|
}
|
||||||
|
|
||||||
$notice_message = '';
|
|
||||||
$return_path = $base_return_path . '/' . $contact['id'];
|
$return_path = $base_return_path . '/' . $contact['id'];
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$result = Contact::terminateFriendship($owner, $contact);
|
$result = Contact::terminateFriendship($owner, $contact);
|
||||||
|
|
||||||
if ($result === null) {
|
|
||||||
$notice_message = DI::l10n()->t('Unfollowing is currently not supported by this contact\'s network.');
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($result === false) {
|
if ($result === false) {
|
||||||
$notice_message = DI::l10n()->t('Unable to unfollow this contact, please retry in a few minutes or contact your administrator.');
|
$notice_message = DI::l10n()->t('Unable to unfollow this contact, please retry in a few minutes or contact your administrator.');
|
||||||
}
|
} else {
|
||||||
|
|
||||||
if ($result === true) {
|
|
||||||
$notice_message = DI::l10n()->t('Contact was successfully unfollowed');
|
$notice_message = DI::l10n()->t('Contact was successfully unfollowed');
|
||||||
}
|
}
|
||||||
} catch (Exception $e) {
|
} catch (Exception $e) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user