diff --git a/config/im.properties b/config/im.properties
index c825800..4f588af 100644
--- a/config/im.properties
+++ b/config/im.properties
@@ -11,4 +11,7 @@ im.use_random_name=true
# 新用户注册时,自动添加机器人为好友。这里可以修改为添加销售人员id,或者客服人员id,用户跟客户进行沟通。
im.new_user_robot_friend=true
im.robot_friend_id=FireRobot
-im.robot_welcome=您好,我是人见人爱、花见花开、天下第一帅的机器人小火!可以跟我聊天哦!
\ No newline at end of file
+im.robot_welcome=您好,我是人见人爱、花见花开、天下第一帅的机器人小火!可以跟我聊天哦!
+
+# 新用户注册时,自动关注频道。如果不需要关注,下面配置内容设置为空就OK了。
+im.new_user_subscribe_channel_id="vwzqmws2k"
diff --git a/pom.xml b/pom.xml
index d9ace04..20ef4f7 100644
--- a/pom.xml
+++ b/pom.xml
@@ -23,7 +23,7 @@
UTF-8
1.8
2.17.2
- 0.89
+ 0.92
diff --git a/src/lib/common-0.89.jar b/src/lib/common-0.89.jar
deleted file mode 100644
index e1f16ed..0000000
Binary files a/src/lib/common-0.89.jar and /dev/null differ
diff --git a/src/lib/common-0.92.jar b/src/lib/common-0.92.jar
index 4ef14d6..d2b725e 100644
Binary files a/src/lib/common-0.92.jar and b/src/lib/common-0.92.jar differ
diff --git a/src/lib/sdk-0.89.jar b/src/lib/sdk-0.89.jar
deleted file mode 100644
index 11f2865..0000000
Binary files a/src/lib/sdk-0.89.jar and /dev/null differ
diff --git a/src/lib/sdk-0.92.jar b/src/lib/sdk-0.92.jar
index 6c6919b..ac45a72 100644
Binary files a/src/lib/sdk-0.92.jar and b/src/lib/sdk-0.92.jar differ
diff --git a/src/main/java/cn/wildfirechat/app/IMConfig.java b/src/main/java/cn/wildfirechat/app/IMConfig.java
index 9bab358..6460bd7 100644
--- a/src/main/java/cn/wildfirechat/app/IMConfig.java
+++ b/src/main/java/cn/wildfirechat/app/IMConfig.java
@@ -27,6 +27,8 @@ public void setUse_random_name(boolean use_random_name) {
String robot_friend_id;
String robot_welcome;
+ String new_user_subscribe_channel_id;
+
public String getAdmin_url() {
return admin_url;
}
@@ -82,4 +84,12 @@ public String getRobot_welcome() {
public void setRobot_welcome(String robot_welcome) {
this.robot_welcome = robot_welcome;
}
+
+ public String getNew_user_subscribe_channel_id() {
+ return new_user_subscribe_channel_id;
+ }
+
+ public void setNew_user_subscribe_channel_id(String new_user_subscribe_channel_id) {
+ this.new_user_subscribe_channel_id = new_user_subscribe_channel_id;
+ }
}
diff --git a/src/main/java/cn/wildfirechat/app/ServiceImpl.java b/src/main/java/cn/wildfirechat/app/ServiceImpl.java
index 000642d..5dac29b 100644
--- a/src/main/java/cn/wildfirechat/app/ServiceImpl.java
+++ b/src/main/java/cn/wildfirechat/app/ServiceImpl.java
@@ -552,12 +552,19 @@ 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.new_user_subscribe_channel_id)) {
+ try {
+ GeneralAdmin.subscribeChannel(mIMConfig.getNew_user_subscribe_channel_id(), user.getUserId());
+ } catch (Exception e) {
+
+ }
+ }
} else {
if (!StringUtils.isEmpty(mIMConfig.welcome_for_back_user)) {
sendTextMessage("admin", user.getUserId(), mIMConfig.welcome_for_back_user);