Skip to content

Commit

Permalink
Merge pull request #275 from odisha-muktasoft/feature/NotificationFix
Browse files Browse the repository at this point in the history
Feature/notification fix
  • Loading branch information
manastanmay-eGov authored Mar 7, 2024
2 parents 965aa1c + 956a6af commit 9566572
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,15 @@ public void sendNotificationForSupervisionBill(BillRequest billRequest){

public String getMessage(RequestInfo requestInfo, String tenantId, String msgCode, Map<String,Object> addtionalFields){
String locale = "en_IN";
String rootTenantId = tenantId.split("\\.")[0];
if(requestInfo.getMsgId().split("\\|").length > 1)
locale = requestInfo.getMsgId().split("\\|")[1];
Map<String, Map<String, String>> localizedMessageMap = localizationUtil.getLocalisedMessages(requestInfo, tenantId,
Map<String, Map<String, String>> localizedMessageMap = localizationUtil.getLocalisedMessages(requestInfo, rootTenantId,
locale, EXPENSE_CALCULATOR_MODULE_CODE);
if(config.isAdditonalFieldRequired()){
setAdditionalFields(requestInfo,tenantId,msgCode,addtionalFields);
setAdditionalFields(requestInfo,rootTenantId,msgCode,addtionalFields);
}
return localizedMessageMap.get(locale + "|" + tenantId).get(msgCode);
return localizedMessageMap.get(locale + "|" + rootTenantId).get(msgCode);
}

public String buildMessageReplaceVariables(String message, String billNumber, String amount){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void sendNotificationToCBO(MusterRollRequest musterRollRequest){
* @return
*/
public String getMessage(MusterRollRequest musterRollRequest, String msgCode){
String tenantId = musterRollRequest.getMusterRoll().getTenantId();
String tenantId = musterRollRequest.getMusterRoll().getTenantId().split("\\.")[0];;
RequestInfo requestInfo = musterRollRequest.getRequestInfo();
String locale = "en_IN";
if(requestInfo.getMsgId().split("\\|").length > 1)
Expand Down

0 comments on commit 9566572

Please sign in to comment.