Skip to content

Commit

Permalink
Issue #SB-1167 Welcome SMS template change
Browse files Browse the repository at this point in the history
  • Loading branch information
AMIT KUMAR committed Dec 20, 2017
1 parent 85c9100 commit 700d20b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -794,8 +794,8 @@ public static String getSMSBody(String orgName, String state, String userName, S
params.put("state", isStringNullOREmpty(state) ? "" : state);
params.put("comma", isStringNullOREmpty(state) ? "" : ",");
params.put("userName", isStringNullOREmpty(userName) ? "user_name" : userName);
params.put("webUrl", isStringNullOREmpty(webUrl) ? "web_url" : webUrl);
params.put("appUrl", isStringNullOREmpty(appUrl) ? "app_url" : appUrl);
params.put("webUrl", isStringNullOREmpty(webUrl) ? "" : webUrl);
params.put("appUrl", isStringNullOREmpty(appUrl) ? "" : appUrl);
params.put("instanceName", isStringNullOREmpty(instanceName) ? "instance_name" : instanceName);
Template t = ve.getTemplate("/welcomeSmsTemplate.vm");
VelocityContext context = new VelocityContext(params);
Expand All @@ -805,6 +805,12 @@ public static String getSMSBody(String orgName, String state, String userName, S
if(isStringNullOREmpty(orgName)){
sms = sms.replace(" for ", "");
}
if(isStringNullOREmpty(appUrl)){
sms = sms.replace("APP download: ", "");
}
if(isStringNullOREmpty(webUrl)){
sms = sms.replace("Web access URL: ", "");
}
return sms;
} catch (Exception ex) {
ProjectLogger.log("Exception occurred while formating and sending SMS " + ex);
Expand Down
2 changes: 1 addition & 1 deletion common-util/src/main/resources/welcomeSmsTemplate.vm
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ You are now a registered user on $instanceName for $orgName$comma $state.
User Name: $userName
Web access URL: $webUrl
#if( $appUrl )
APP download: $appUrl
APP download: $appUrl
#end

0 comments on commit 700d20b

Please sign in to comment.