This is an automated email from the ASF dual-hosted git repository.
pawan pushed a commit to branch release18.12 in repository https://gitbox.apache.org/repos/asf/ofbiz-framework.git The following commit(s) were added to refs/heads/release18.12 by this push: new df64a3b Revert "Fixed: Potensial bug under CommunicationEventServices#updateCommEventAfterEmail for CommunicationEvent.subject field" (OFBIZ-10879) df64a3b is described below commit df64a3b31e68e2e314331a99a898f487348301b6 Author: Pawan Verma <[hidden email]> AuthorDate: Wed Jan 29 12:59:09 2020 +0530 Revert "Fixed: Potensial bug under CommunicationEventServices#updateCommEventAfterEmail for CommunicationEvent.subject field" (OFBIZ-10879) This reverts commit bbcc4692dccdf573aa0205f927b56bc271719031. --- .../communication/CommunicationEventServices.java | 23 ---------------------- 1 file changed, 23 deletions(-) diff --git a/applications/party/src/main/java/org/apache/ofbiz/party/communication/CommunicationEventServices.java b/applications/party/src/main/java/org/apache/ofbiz/party/communication/CommunicationEventServices.java index ab81e3c..b312b96 100644 --- a/applications/party/src/main/java/org/apache/ofbiz/party/communication/CommunicationEventServices.java +++ b/applications/party/src/main/java/org/apache/ofbiz/party/communication/CommunicationEventServices.java @@ -43,7 +43,6 @@ import javax.mail.internet.InternetAddress; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.apache.commons.lang.StringUtils; import org.apache.ofbiz.base.location.FlexibleLocation; import org.apache.ofbiz.base.util.Debug; import org.apache.ofbiz.base.util.GeneralException; @@ -824,7 +823,6 @@ public class CommunicationEventServices { */ public static Map<String, Object> updateCommEventAfterEmail(DispatchContext dctx, Map<String, ? extends Object> context) { LocalDispatcher dispatcher = dctx.getDispatcher(); - Delegator delegator = dctx.getDelegator(); GenericValue userLogin = (GenericValue) context.get("userLogin"); String communicationEventId = (String) context.get("communicationEventId"); @@ -840,27 +838,6 @@ public class CommunicationEventServices { commEventMap.put("userLogin", userLogin); commEventMap.put("content", wrapper.getMessageBody()); - String subject = wrapper.getSubject(); - String redirectAddress = EntityUtilProperties.getPropertyValue("general", - "mail.notifications.redirectTo", delegator); - if (UtilValidate.isNotEmpty(redirectAddress) && subject.endsWith("]") && subject.contains(" [To: ")) { - // Format of subject for redirected mail from sendMail service: - // "Original subject [To: <sendTo>, Cc: <sendCc>, Bcc: <sendBcc>]" - String origSendTo = StringUtils.substringBetween(subject, "[To: ", ", Cc:"); - String origSendCc = StringUtils.substringBetween(subject, ", Cc: ", ", Bcc:"); - String origSendBcc = StringUtils.substringBetween(subject, ", Bcc: ", "]"); - - // ignore "null" Strings in subject - if (origSendTo != "null") commEventMap.put("toString", origSendTo); - if (origSendCc != "null") commEventMap.put("ccString", origSendCc); - if (origSendBcc != "null") commEventMap.put("bccString", origSendBcc); - - // Format of subject in commEvent: "Original subject [RedirectedTo: [hidden email]]" - subject = StringUtils.substringBefore(subject, "[To: ") - + "[RedirectedTo: " + commEventMap.get("fromString") + "]"; - commEventMap.put("subject", StringUtils.abbreviate(subject, 255)); - } - // populate the address (to/from/cc/bcc) data populateAddressesFromMessage(wrapper, commEventMap); |
Free forum by Nabble | Edit this page |