From b620788b3669e4ba38cfee2b06a6d914ee15a4c0 Mon Sep 17 00:00:00 2001 From: Will Kwon Date: Mon, 30 Jul 2018 18:09:33 -0700 Subject: [PATCH] Adding the external_user_ID parameter MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit conditionally if it’s not empty --- .../org/wordpress/android/ui/publicize/PublicizeActions.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/WordPress/src/main/java/org/wordpress/android/ui/publicize/PublicizeActions.java b/WordPress/src/main/java/org/wordpress/android/ui/publicize/PublicizeActions.java index d8dedddf71b1..e46e5875645d 100644 --- a/WordPress/src/main/java/org/wordpress/android/ui/publicize/PublicizeActions.java +++ b/WordPress/src/main/java/org/wordpress/android/ui/publicize/PublicizeActions.java @@ -134,7 +134,9 @@ public void onErrorResponse(VolleyError volleyError) { Map params = new HashMap<>(); params.put("keyring_connection_ID", Long.toString(keyringConnectionId)); - params.put("external_user_ID", externalUserId); + if (!externalUserId.isEmpty()) { + params.put("external_user_ID", externalUserId); + } String path = String.format(Locale.ROOT, "/sites/%d/publicize-connections/new", siteId); WordPress.getRestClientUtilsV1_1().post(path, params, null, listener, errorListener); }