本文整理匯總了Java中com.netease.nimlib.sdk.team.model.MuteMemberAttachment類的典型用法代碼示例。如果您正苦於以下問題:Java MuteMemberAttachment類的具體用法?Java MuteMemberAttachment怎麽用?Java MuteMemberAttachment使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
MuteMemberAttachment類屬於com.netease.nimlib.sdk.team.model包,在下文中一共展示了MuteMemberAttachment類的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: buildMuteTeamNotification
import com.netease.nimlib.sdk.team.model.MuteMemberAttachment; //導入依賴的package包/類
private static String buildMuteTeamNotification(MuteMemberAttachment a) {
StringBuilder sb = new StringBuilder();
sb.append(buildMemberListString(a.getTargets(), null));
sb.append("被管理員");
sb.append(a.isMute() ? "禁言" : "解除禁言");
return sb.toString();
}
示例2: buildNotification
import com.netease.nimlib.sdk.team.model.MuteMemberAttachment; //導入依賴的package包/類
private static String buildNotification(String tid, String fromAccount, NotificationAttachment attachment) {
String text;
switch (attachment.getType()) {
case InviteMember:
text = buildInviteMemberNotification(((MemberChangeAttachment) attachment), fromAccount);
break;
case KickMember:
text = buildKickMemberNotification(((MemberChangeAttachment) attachment));
break;
case LeaveTeam:
text = buildLeaveTeamNotification(fromAccount);
break;
case DismissTeam:
text = buildDismissTeamNotification(fromAccount);
break;
case UpdateTeam:
text = buildUpdateTeamNotification(tid, fromAccount, (UpdateTeamAttachment) attachment);
break;
case PassTeamApply:
text = buildManagerPassTeamApplyNotification((MemberChangeAttachment) attachment);
break;
case TransferOwner:
text = buildTransferOwnerNotification(fromAccount, (MemberChangeAttachment) attachment);
break;
case AddTeamManager:
text = buildAddTeamManagerNotification((MemberChangeAttachment) attachment);
break;
case RemoveTeamManager:
text = buildRemoveTeamManagerNotification((MemberChangeAttachment) attachment);
break;
case AcceptInvite:
text = buildAcceptInviteNotification(fromAccount, (MemberChangeAttachment) attachment);
break;
case MuteTeamMember:
text = buildMuteTeamNotification((MuteMemberAttachment) attachment);
break;
default:
text = getTeamMemberDisplayName(fromAccount) + ": unknown message";
break;
}
return text;
}