mirror of
https://gitee.com/xchao/j-im.git
synced 2024-12-02 11:57:43 +08:00
修复开启持久化不绑定群组用户信息无法持久化问题
This commit is contained in:
parent
a796d52c5f
commit
c301112e0d
@ -43,15 +43,6 @@ public class RedisImBindListener implements ImBindListener,Const{
|
||||
if(!isStore())
|
||||
return;
|
||||
initGroupUsers(group,channelContext);
|
||||
ImSessionContext imSessionContext = (ImSessionContext)channelContext.getAttribute();
|
||||
Client client = imSessionContext.getClient();
|
||||
if(client == null)
|
||||
return;
|
||||
User onlineUser = client.getUser();
|
||||
if(onlineUser != null){
|
||||
initUserTerminal(channelContext,onlineUser.getTerminal(),ONLINE);
|
||||
initUserInfo(onlineUser);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -68,6 +59,15 @@ public class RedisImBindListener implements ImBindListener,Const{
|
||||
public void onAfterUserBind(ChannelContext channelContext, String userid) throws Exception {
|
||||
if(!isStore())
|
||||
return;
|
||||
ImSessionContext imSessionContext = (ImSessionContext)channelContext.getAttribute();
|
||||
Client client = imSessionContext.getClient();
|
||||
if(client == null)
|
||||
return;
|
||||
User onlineUser = client.getUser();
|
||||
if(onlineUser != null){
|
||||
initUserTerminal(channelContext,onlineUser.getTerminal(),ONLINE);
|
||||
initUserInfo(onlineUser);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
Loading…
Reference in New Issue
Block a user