1 package com.netease.nimlib.sdk.msg.model;
5 import java.util.ArrayList;
16 private String teamId;
19 private String newReaderAccount;
21 private int unAckCount;
22 private List<String> ackAccountList;
23 private List<String> unAckAccountList;
25 public TeamMsgAckInfo(String teamId, String msgId,
int ackCount,
int unAckCount) {
26 this(teamId, msgId, ackCount, unAckCount, null);
29 public TeamMsgAckInfo(String teamId, String msgId,
int ackCount,
int unAckCount, String newReaderAccount) {
32 this.ackCount = ackCount;
33 this.unAckCount = unAckCount;
34 this.newReaderAccount = newReaderAccount;
37 public TeamMsgAckInfo(String teamId, String msgId, List<String> ackAccountList, List<String> unAckAccountList) {
40 this.ackAccountList = ackAccountList;
41 this.unAckAccountList = unAckAccountList;
53 if (ackAccountList != null) {
54 return ackAccountList.size();
61 if (unAckAccountList != null) {
62 return unAckAccountList.size();
69 return newReaderAccount;
73 return ackAccountList;
77 return unAckAccountList;
89 if (CollectionUtil.isEmpty(ackAccountList) && CollectionUtil.isEmpty(unAckAccountList)) {
94 if (CollectionUtil.isEmpty(accountSet)) {
95 return new TeamMsgAckInfo(teamId, msgId,
new ArrayList<>(0),
new ArrayList<>(0));
98 List<String> chosenAckList = CollectionUtil.findAll(this.ackAccountList, accountSet::contains);
99 List<String> chosenUnAckList = CollectionUtil.findAll(this.unAckAccountList, accountSet::contains);
100 return new TeamMsgAckInfo(teamId, msgId, chosenAckList, chosenUnAckList);
List< String > getUnAckAccountList()
List< String > getAckAccountList()
TeamMsgAckInfo newInstanceFromPartOfAccount(Set< String > accountSet)
生成一个新的实例,里面只包含指定用户的已读未读情况 如果当前实例中不含用户列表,直接返回null ...
String getNewReaderAccount()
TeamMsgAckInfo(String teamId, String msgId, int ackCount, int unAckCount, String newReaderAccount)
群已读回执信息 此类有两种状态,一种是存储已读未读用户账号列表的状态,一种是存储已读未读人数的状态 第...
TeamMsgAckInfo(String teamId, String msgId, int ackCount, int unAckCount)
TeamMsgAckInfo(String teamId, String msgId, List< String > ackAccountList, List< String > unAckAccountList)