+ try {
+ $result = ContactModel::terminateFriendship($user, $contact);
+ if ($result === false) {
+ throw new RuntimeException('Unable to unfollow this contact, please retry in a few minutes or check the logs.');
+ }
+
+ $this->out('Contact was successfully unfollowed');
+
+ return true;
+ } catch (\Exception $e) {
+ DI::logger()->error($e->getMessage(), ['owner' => $user, 'contact' => $contact]);
+ throw new RuntimeException('Unable to unfollow this contact, please check the log');
+ }