當前位置: 首頁>>代碼示例>>Java>>正文


Java MuteMemberAttachment類代碼示例

本文整理匯總了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();
}
 
開發者ID:newDeepLearing,項目名稱:decoy,代碼行數:10,代碼來源:TeamNotificationHelper.java

示例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;
}
 
開發者ID:newDeepLearing,項目名稱:decoy,代碼行數:44,代碼來源:TeamNotificationHelper.java


注:本文中的com.netease.nimlib.sdk.team.model.MuteMemberAttachment類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。