From ae362f01d52ddf55c8310549115cef2626573934 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 30 Jan 2018 18:51:09 +0000 Subject: [PATCH 1/4] Quit if follow failes because of not configured addon --- src/Model/Contact.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 3b12dbf73..27925bfe0 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -1151,6 +1151,11 @@ class Contact extends BaseObject Addon::callHooks('follow', $arr); + if (empty($arr)) { + $result['message'] = L10n::t('Contact cannot be added.'); + return $result; + } + if (x($arr['contact'], 'name')) { $ret = $arr['contact']; } else { From edf7213297124afab930ad7bf1cb17e72fb0c268 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 30 Jan 2018 19:20:41 +0000 Subject: [PATCH 2/4] Better message --- src/Model/Contact.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 27925bfe0..974f7a3bf 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -1152,7 +1152,7 @@ class Contact extends BaseObject Addon::callHooks('follow', $arr); if (empty($arr)) { - $result['message'] = L10n::t('Contact cannot be added.'); + $result['message'] = L10n::t('The contact could not be added. It is possible you are attempting to add a contact that requires an Addon that is not enabled on this system.'); return $result; } From e08be4e92178bfb0331e4085f9785bbc408151b0 Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 30 Jan 2018 19:31:57 +0000 Subject: [PATCH 3/4] Improved message --- src/Model/Contact.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 974f7a3bf..8b11f716b 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -1152,7 +1152,7 @@ class Contact extends BaseObject Addon::callHooks('follow', $arr); if (empty($arr)) { - $result['message'] = L10n::t('The contact could not be added. It is possible you are attempting to add a contact that requires an Addon that is not enabled on this system.'); + $result['message'] = L10n::t('The contact could not be added. It is possible you are attempting to add a contact that requires an Addon that is not configured on this system.'); return $result; } From f8526c1664cfc8967461708c96547ba8d2f2a68f Mon Sep 17 00:00:00 2001 From: Michael Date: Tue, 30 Jan 2018 20:48:12 +0000 Subject: [PATCH 4/4] Some other message --- src/Model/Contact.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Model/Contact.php b/src/Model/Contact.php index 8b11f716b..3ec9f5ab4 100644 --- a/src/Model/Contact.php +++ b/src/Model/Contact.php @@ -1152,7 +1152,7 @@ class Contact extends BaseObject Addon::callHooks('follow', $arr); if (empty($arr)) { - $result['message'] = L10n::t('The contact could not be added. It is possible you are attempting to add a contact that requires an Addon that is not configured on this system.'); + $result['message'] = L10n::t('The contact could not be added. Please check the relevant network credentials in your Settings -> Social Networks page.'); return $result; }