- // Sharing-only contacts get deleted as there no relationship anymore
- if ($dissolve) {
- Contact::remove($contact['id']);
- $return_path = $base_return_path;
- } else {
- Contact::update(['rel' => Contact::FOLLOWER], ['id' => $contact['id']]);
- $return_path = $base_return_path . '/' . $contact['id'];
+ if ($result === true) {
+ $notice_message = DI::l10n()->t('Contact was successfully unfollowed');
+ }
+ } catch (Exception $e) {
+ DI::logger()->error($e->getMessage(), ['owner' => $owner, 'contact' => $contact]);
+ $notice_message = DI::l10n()->t('Unable to unfollow this contact, please contact your administrator');