diff --git a/WordPress/src/main/java/org/wordpress/android/ui/ActivityLauncher.java b/WordPress/src/main/java/org/wordpress/android/ui/ActivityLauncher.java index 25516bc695c5..58ffda36dcf1 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/ActivityLauncher.java +++ b/WordPress/src/main/java/org/wordpress/android/ui/ActivityLauncher.java @@ -95,6 +95,7 @@ import org.wordpress.android.ui.posts.PostsListActivity; import org.wordpress.android.ui.posts.RemotePreviewLogicHelper.RemotePreviewType; import org.wordpress.android.ui.prefs.AccountSettingsActivity; +import org.wordpress.android.ui.prefs.AppPrefs; import org.wordpress.android.ui.prefs.AppSettingsActivity; import org.wordpress.android.ui.prefs.BlogPreferencesActivity; import org.wordpress.android.ui.prefs.MyProfileActivity; @@ -127,6 +128,7 @@ import org.wordpress.android.util.AppLog; import org.wordpress.android.util.AppLog.T; import org.wordpress.android.util.ToastUtils; +import org.wordpress.android.util.ToastUtils.Duration; import org.wordpress.android.util.UriWrapper; import org.wordpress.android.util.UrlUtils; import org.wordpress.android.util.WPActivityUtils; @@ -1311,6 +1313,7 @@ public static void viewHelp(@NonNull Context context, @NonNull Origin origin, @N } public static void viewFeedbackForm(@NonNull Context context) { + warnIfIdentityA8C(context); // TODO verify tracks event with iOS AnalyticsTracker.track(Stat.FEEDBACK_FORM_OPENED); Intent intent = new Intent(context, FeedbackFormActivity.class); @@ -1322,6 +1325,17 @@ public static void viewZendeskTickets(@NonNull Context context, viewHelpInNewStack(context, Origin.ZENDESK_NOTIFICATION, selectedSite, null); } + /** + * Warn A8C users that they can't create Zendesk tickets + */ + @NonNull + public static void warnIfIdentityA8C(@NonNull Context context) { + String supportEmail = AppPrefs.getSupportEmail(); + if (supportEmail.contains("@automattic.com") || supportEmail.contains("@a8c.com")) { + ToastUtils.showToast(context, R.string.support_warn_if_user_a8c, Duration.LONG); + } + } + public static void viewSSLCerts(Context context, String certificateString) { Intent intent = new Intent(context, SSLCertsViewActivity.class); intent.putExtra(SSLCertsViewActivity.CERT_DETAILS_KEYS, certificateString.replaceAll("\n", "
")); diff --git a/WordPress/src/main/java/org/wordpress/android/ui/accounts/HelpActivity.kt b/WordPress/src/main/java/org/wordpress/android/ui/accounts/HelpActivity.kt index c804645a87fe..d2fdeeaa7964 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/accounts/HelpActivity.kt +++ b/WordPress/src/main/java/org/wordpress/android/ui/accounts/HelpActivity.kt @@ -169,6 +169,7 @@ class HelpActivity : LocaleAwareActivity() { } private fun launchSupportWidget() { + ActivityLauncher.warnIfIdentityA8C(this) val intent = SupportWebViewActivity.createIntent( this, originFromExtras, @@ -179,6 +180,7 @@ class HelpActivity : LocaleAwareActivity() { } private fun createNewZendeskTicket() { + ActivityLauncher.warnIfIdentityA8C(this) zendeskHelper.createNewTicket( this, originFromExtras, @@ -193,6 +195,7 @@ class HelpActivity : LocaleAwareActivity() { } private fun showZendeskTickets() { + ActivityLauncher.warnIfIdentityA8C(this) zendeskHelper.showAllTickets( this, originFromExtras, diff --git a/WordPress/src/main/res/values/strings.xml b/WordPress/src/main/res/values/strings.xml index 71bef371351f..da67d914d3ab 100644 --- a/WordPress/src/main/res/values/strings.xml +++ b/WordPress/src/main/res/values/strings.xml @@ -1143,6 +1143,7 @@ Unable to create temporary file Add attachments If you need support, please get in touch using the \"Help & Support\" screen + Automattic email accounts can\'t submit or view support tickets Remove item %1$d