1 package com.netease.nimlib.sdk.msg.model;
5 import java.util.ArrayList;
16 private final String teamId;
17 private final String msgId;
18 private final String messageServerId;
20 private String newReaderAccount;
22 private int unAckCount;
23 private List<String> ackAccountList;
24 private List<String> unAckAccountList;
26 public TeamMsgAckInfo(String teamId, String msgId, String messageServerId,
int ackCount,
int unAckCount) {
27 this(teamId, msgId, messageServerId, ackCount, unAckCount, null);
30 public TeamMsgAckInfo(String teamId, String msgId, String messageServerId,
int ackCount,
int unAckCount, String newReaderAccount) {
33 this.messageServerId = messageServerId;
34 this.ackCount = ackCount;
35 this.unAckCount = unAckCount;
36 this.newReaderAccount = newReaderAccount;
39 public TeamMsgAckInfo(String teamId, String msgId, String messageServerId, List<String> ackAccountList, List<String> unAckAccountList) {
42 this.messageServerId = messageServerId;
43 this.ackAccountList = ackAccountList;
44 this.unAckAccountList = unAckAccountList;
58 return messageServerId;
62 if (ackAccountList != null) {
63 return ackAccountList.size();
70 if (unAckAccountList != null) {
71 return unAckAccountList.size();
78 return newReaderAccount;
82 return ackAccountList;
86 return unAckAccountList;
98 if (CollectionUtil.isEmpty(ackAccountList) && CollectionUtil.isEmpty(unAckAccountList)) {
103 if (CollectionUtil.isEmpty(accountSet)) {
104 return new TeamMsgAckInfo(teamId, msgId, messageServerId,
new ArrayList<>(0),
new ArrayList<>(0));
107 List<String> chosenAckList = CollectionUtil.findAll(this.ackAccountList, accountSet::contains);
108 List<String> chosenUnAckList = CollectionUtil.findAll(this.unAckAccountList, accountSet::contains);
109 return new TeamMsgAckInfo(teamId, msgId, messageServerId, chosenAckList, chosenUnAckList);
TeamMsgAckInfo(String teamId, String msgId, String messageServerId, int ackCount, int unAckCount, String newReaderAccount)
List< String > getUnAckAccountList()
TeamMsgAckInfo(String teamId, String msgId, String messageServerId, List< String > ackAccountList, List< String > unAckAccountList)
List< String > getAckAccountList()
TeamMsgAckInfo newInstanceFromPartOfAccount(Set< String > accountSet)
生成一个新的实例,里面只包含指定用户的已读未读情况 如果当前实例中不含用户列表,直接返回null ...
String getNewReaderAccount()
群已读回执信息 此类有两种状态,一种是存储已读未读用户账号列表的状态,一种是存储已读未读人数的状态 第...
TeamMsgAckInfo(String teamId, String msgId, String messageServerId, int ackCount, int unAckCount)
String getMessageServerId()