diff --git a/src/main/java/cn/wildfirechat/app/ServiceImpl.java b/src/main/java/cn/wildfirechat/app/ServiceImpl.java index e605d89..6d0cbd7 100644 --- a/src/main/java/cn/wildfirechat/app/ServiceImpl.java +++ b/src/main/java/cn/wildfirechat/app/ServiceImpl.java @@ -596,9 +596,9 @@ private RestResult onLoginSuccess(HttpServletResponse httpResponse, String mobil if (mIMConfig.new_user_robot_friend && !StringUtils.isEmpty(mIMConfig.robot_friend_id)) { RelationAdmin.setUserFriend(user.getUserId(), mIMConfig.robot_friend_id, true, null); - if (!StringUtils.isEmpty(mIMConfig.robot_welcome)) { - sendTextMessage(mIMConfig.robot_friend_id, user.getUserId(), mIMConfig.robot_welcome); - } + } + if (!StringUtils.isEmpty(mIMConfig.robot_welcome)) { + sendTextMessage(mIMConfig.robot_friend_id, user.getUserId(), mIMConfig.robot_welcome); } if (!StringUtils.isEmpty(mIMConfig.new_user_subscribe_channel_id)) { @@ -612,6 +612,9 @@ private RestResult onLoginSuccess(HttpServletResponse httpResponse, String mobil if (!StringUtils.isEmpty(mIMConfig.welcome_for_back_user)) { sendTextMessage(mIMConfig.admin_user_id, user.getUserId(), mIMConfig.welcome_for_back_user); } + if (!StringUtils.isEmpty(mIMConfig.robot_welcome)) { + sendTextMessage(mIMConfig.robot_friend_id, user.getUserId(), mIMConfig.robot_welcome); + } if (!StringUtils.isEmpty(mIMConfig.back_user_subscribe_channel_id)) { try { IMResult booleanValueIMResult = GeneralAdmin.isUserSubscribedChannel(user.getUserId(), mIMConfig.getBack_user_subscribe_channel_id());