- $result = Contact::terminateFriendship($owner, $contact);
-
- if ($result === false) {
- $notice_message = DI::l10n()->t('Unable to unfollow this contact, please retry in a few minutes or contact your administrator.');
- } else {
- $notice_message = DI::l10n()->t('Contact was successfully unfollowed');
- }
+ Contact::unfollow($contact);
+ $notice_message = DI::l10n()->t('Contact was successfully unfollowed');