mirror of
https://gitee.com/xchao/j-im.git
synced 2024-12-02 11:57:43 +08:00
重构群组CMD命令
This commit is contained in:
parent
8ee99e6e2b
commit
c3010c9f52
@ -48,7 +48,7 @@ public class JoinGroupReqHandler extends AbstractCmdHandler {
|
||||
User notifyUser = new User(clientUser.getUserId(),clientUser.getNick());
|
||||
|
||||
Group joinGroup = JsonKit.toBean(packet.getBody(),Group.class);
|
||||
String groupId = joinGroup.getGroup_id();
|
||||
String groupId = joinGroup.getGroupId();
|
||||
//发进房间通知 COMMAND_JOIN_GROUP_NOTIFY_RESP
|
||||
JoinGroupNotifyRespBody joinGroupNotifyRespBody = new JoinGroupNotifyRespBody(Command.COMMAND_JOIN_GROUP_NOTIFY_RESP, ImStatus.C10011)
|
||||
.setGroup(groupId)
|
||||
@ -67,7 +67,7 @@ public class JoinGroupReqHandler extends AbstractCmdHandler {
|
||||
throw new ImException("body is null");
|
||||
}
|
||||
Group joinGroup = JsonKit.toBean(packet.getBody(),Group.class);
|
||||
String groupId = joinGroup.getGroup_id();
|
||||
String groupId = joinGroup.getGroupId();
|
||||
if (StringUtils.isBlank(groupId)) {
|
||||
log.error("group is null,{}", imChannelContext);
|
||||
Jim.close(imChannelContext, "group is null when join group");
|
||||
|
@ -122,7 +122,7 @@ public class RedisImBindListener extends AbstractImBindListener{
|
||||
return;
|
||||
}
|
||||
for(Group group : groups){
|
||||
if(groupId.equals(group.getGroup_id())){
|
||||
if(groupId.equals(group.getGroupId())){
|
||||
groupCache.put(groupId+SUFFIX+INFO, group);
|
||||
break;
|
||||
}
|
||||
|
@ -369,7 +369,7 @@ public class RedisMessageHelper extends AbstractMessageHelper{
|
||||
return null;
|
||||
}
|
||||
for(Group group : friends){
|
||||
if(friend_group_id.equals(group.getGroup_id())){
|
||||
if(friend_group_id.equals(group.getGroupId())){
|
||||
List<User> users = group.getUsers();
|
||||
if(CollectionUtils.isEmpty(users)) {
|
||||
return null;
|
||||
|
Loading…
Reference in New Issue
Block a user