Skip to content

Commit

Permalink
do not send subscribed if not set to true
Browse files Browse the repository at this point in the history
  • Loading branch information
rahulrvp committed Nov 10, 2017
1 parent 6c70bc5 commit c33aa4d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion android-sdk/src/main/java/com/blueshift/Blueshift.java
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,12 @@ private HashMap<String, Object> appendOptionalUserInfo(HashMap<String, Object> p
}
params.put(BlueshiftConstants.KEY_FACEBOOK_ID, userInfo.getFacebookId());
params.put(BlueshiftConstants.KEY_EDUCATION, userInfo.getEducation());
params.put(BlueshiftConstants.KEY_UNSUBSCRIBED, userInfo.isUnsubscribed());

if (userInfo.isUnsubscribed()) {
// we don't need to send this key if it set to false
params.put(BlueshiftConstants.KEY_UNSUBSCRIBED, true);
}

if (userInfo.getDetails() != null) {
params.putAll(userInfo.getDetails());
}
Expand Down

0 comments on commit c33aa4d

Please sign in to comment.