|
|
@@ -348,12 +348,12 @@ public class CorpEventActionServiceImpl implements CorpEventActionService {
|
|
|
text.put("content", corpNewUserWelcomeMsg.getText());
|
|
|
params.putOpt("welcome_code", welcomeCode);
|
|
|
params.putOpt("text", text);
|
|
|
- if (corpNewUserWelcomeMsg.getIsLink()) {
|
|
|
+ Optional.ofNullable(corpNewUserWelcomeMsg.getIsLink()).ifPresent(linkUrl -> {
|
|
|
List<Attachments> attachments = new ArrayList<>();
|
|
|
Attachments link = new Attachments("link", new Attachments.Link(corpNewUserWelcomeMsg.getLinkTitle(), corpNewUserWelcomeMsg.getLinkPicUrl(), corpNewUserWelcomeMsg.getLinkDesc(), corpNewUserWelcomeMsg.getLinkUrl()));
|
|
|
attachments.add(link);
|
|
|
params.putOpt("attachments", attachments);
|
|
|
- }
|
|
|
+ });
|
|
|
HttpResponse<byte[]> res = null;
|
|
|
try {
|
|
|
res = J11HttpC.custom()
|