Merge pull request #4363 from annando/follow-fail

Quit if follow fails because of not configured addon
This commit is contained in:
Hypolite Petovan 2018-01-30 15:49:12 -05:00 committed by GitHub
commit 112e55e760
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1151,6 +1151,11 @@ class Contact extends BaseObject
Addon::callHooks('follow', $arr); Addon::callHooks('follow', $arr);
if (empty($arr)) {
$result['message'] = L10n::t('The contact could not be added. Please check the relevant network credentials in your Settings -> Social Networks page.');
return $result;
}
if (x($arr['contact'], 'name')) { if (x($arr['contact'], 'name')) {
$ret = $arr['contact']; $ret = $arr['contact'];
} else { } else {