Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
heavyrain2012 committed Aug 14, 2019
1 parent ce751eb commit 2bf06f3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 2 additions & 0 deletions config/im.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
im.admin_url=http://localhost:18080
im.admin_secret=123456

#如果发送消息为乱码,请检查服务器是否支持中文
#如果您不需要登陆欢迎消息,请删掉下面两行
im.welcome_for_new_user=欢迎使用野火IM。野火IM是一款安全可靠的开源IM,能够让您快速建立起属于自己的安全沟通工具。关于野火IM的特点/价格/使用方法,请查看文档 http://docs.wildfirechat.cn。 开源源码在这里 https://github.com/wildfirechat。 加入 http://bbs.wildfirechat.cn 参与野火IM的技术讨论。关注微信公众号"野火IM"接收最新的野火IM资讯。野火IM欢迎您的加入!
im.welcome_for_back_user=欢迎您的归来,如果使用过程中有什么疑问请加入 http://bbs.wildfirechat.cn 进行讨论。请关注微信公众号"野火IM"接收野火IM的最新资讯。
8 changes: 6 additions & 2 deletions src/main/java/cn/wildfirechat/app/ServiceImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,13 @@ public RestResult login(String mobile, String code, String clientId) {
response.setRegister(isNewUser);

if (isNewUser) {
sendTextMessage(user.getUserId(), mIMConfig.welcome_for_new_user);
if (!StringUtils.isEmpty(mIMConfig.welcome_for_new_user)) {
sendTextMessage(user.getUserId(), mIMConfig.welcome_for_new_user);
}
} else {
sendTextMessage(user.getUserId(), mIMConfig.welcome_for_back_user);
if (!StringUtils.isEmpty(mIMConfig.welcome_for_back_user)) {
sendTextMessage(user.getUserId(), mIMConfig.welcome_for_back_user);
}
}

return RestResult.ok(response);
Expand Down

0 comments on commit 2bf06f3

Please sign in to comment.