Skip to content

Commit

Permalink
每次登录的时候都发送机器人欢迎语
Browse files Browse the repository at this point in the history
  • Loading branch information
heavyrian2012 committed Feb 25, 2024
1 parent 2893cd7 commit 5026dac
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/main/java/cn/wildfirechat/app/ServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand All @@ -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<OutputBooleanValue> booleanValueIMResult = GeneralAdmin.isUserSubscribedChannel(user.getUserId(), mIMConfig.getBack_user_subscribe_channel_id());
Expand Down

0 comments on commit 5026dac

Please sign in to comment.