1
This commit is contained in:
@@ -211,8 +211,12 @@ public class JDProductService {
|
|||||||
String targetUrl = productObj.getString("effectiveUrl");
|
String targetUrl = productObj.getString("effectiveUrl");
|
||||||
String normalizedForReplace = productObj.getString("normalizedUrl");
|
String normalizedForReplace = productObj.getString("normalizedUrl");
|
||||||
String messageWithShortUrl = message;
|
String messageWithShortUrl = message;
|
||||||
if (normalizedForReplace != null && targetUrl != null) {
|
if (targetUrl != null) {
|
||||||
messageWithShortUrl = message.replace(normalizedForReplace, targetUrl);
|
String replaced = message.replace(originalUrlInText, targetUrl);
|
||||||
|
if (replaced.equals(message) && normalizedForReplace != null) {
|
||||||
|
replaced = replaced.replace(normalizedForReplace, targetUrl);
|
||||||
|
}
|
||||||
|
messageWithShortUrl = replaced;
|
||||||
}
|
}
|
||||||
commonWenan.put("content", format + FANAN_COMMON + messageWithShortUrl);
|
commonWenan.put("content", format + FANAN_COMMON + messageWithShortUrl);
|
||||||
wenanArray.add(commonWenan);
|
wenanArray.add(commonWenan);
|
||||||
|
|||||||
Reference in New Issue
Block a user