REQ-3345: 移除群成员
This commit is contained in:
parent
8e3ae7e2cd
commit
6dd5b38530
@ -95,7 +95,7 @@ public class GroupManager {
|
|||||||
GroupCreateResponse response = new GroupCreateResponse();
|
GroupCreateResponse response = new GroupCreateResponse();
|
||||||
response.setTid(nimResponse.getTid());
|
response.setTid(nimResponse.getTid());
|
||||||
response.setAccountsNotFound(getAccountNotFoundPersons(
|
response.setAccountsNotFound(getAccountNotFoundPersons(
|
||||||
notification, "创建群", imAccounts, group, request.getMembers()));
|
"创建群", imAccounts, group, request.getMembers()));
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -152,7 +152,7 @@ public class GroupManager {
|
|||||||
MqEventType.GROUP_ADD_MEMBERS);
|
MqEventType.GROUP_ADD_MEMBERS);
|
||||||
GroupAddMembersResponse response = new GroupAddMembersResponse();
|
GroupAddMembersResponse response = new GroupAddMembersResponse();
|
||||||
response.setAccountsNotFound(getAccountNotFoundPersons(
|
response.setAccountsNotFound(getAccountNotFoundPersons(
|
||||||
notification, "添加群成员", imAccounts, group, request.getMembers()));
|
"添加群成员", imAccounts, group, request.getMembers()));
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -205,15 +205,15 @@ public class GroupManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Set<PersonAccountAttribute> getAccountNotFoundPersons(
|
public Set<PersonAccountAttribute> getAccountNotFoundPersons(
|
||||||
Notification notification, String operation,
|
String operation, ImAccounts accounts, Group group,
|
||||||
ImAccounts accounts, Group group, Set<PersonAccountAttribute> persons) {
|
Set<PersonAccountAttribute> persons) {
|
||||||
if (org.apache.commons.collections.CollectionUtils.isEmpty(persons))
|
if (org.apache.commons.collections.CollectionUtils.isEmpty(persons))
|
||||||
return Collections.emptySet();
|
return Collections.emptySet();
|
||||||
Set<PersonAccountAttribute> notFound = persons.stream()
|
Set<PersonAccountAttribute> notFound = persons.stream()
|
||||||
.filter(person -> !accounts.findAccount(person).isPresent())
|
.filter(person -> !accounts.findAccount(person).isPresent())
|
||||||
.collect(toSet());
|
.collect(toSet());
|
||||||
if (!notFound.isEmpty())
|
if (!notFound.isEmpty())
|
||||||
notification.send("{}[{},{}], IM账号不存在列表: {}", operation,
|
this.notification.send("{}[{},{}], IM账号不存在列表: {}", operation,
|
||||||
group.getTid(), group.getName(),
|
group.getTid(), group.getName(),
|
||||||
cn.axzo.framework.jackson.utility.JSON.toJSONString(notFound));
|
cn.axzo.framework.jackson.utility.JSON.toJSONString(notFound));
|
||||||
return notFound;
|
return notFound;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user