buildUpdateTeamNotification static method

String buildUpdateTeamNotification(
  1. NIMUpdateTeamAttachment attachment
)

Implementation

static String buildUpdateTeamNotification(
    NIMUpdateTeamAttachment attachment) {
  if (attachment.updatedFields.updatedName != null) {
    return S()
        .chat_team_notify_update_name(attachment.updatedFields.updatedName!);
  } else if (attachment.updatedFields.updatedIntroduce != null) {
    return S().chat_team_notify_update_introduction(
        attachment.updatedFields.updatedIntroduce!);
  } else if (attachment.updatedFields.updatedAnnouncement != null) {
    return S().chat_team_notice_update(
        attachment.updatedFields.updatedAnnouncement!);
  } else if (attachment.updatedFields.updatedVerifyType != null) {
    if (attachment.updatedFields.updatedVerifyType ==
        NIMVerifyTypeEnum.apply) {
      return S().chat_team_verify_update_as_need_verify;
    } else if (attachment.updatedFields.updatedVerifyType ==
        NIMVerifyTypeEnum.private) {
      return S().chat_team_verify_update_as_disallow_anyone_join;
    } else {
      return S().chat_team_verify_update_as_need_no_verify;
    }
  } else if (attachment.updatedFields.updatedExtension != null) {
    return S().chat_team_notify_update_extension(
        attachment.updatedFields.updatedExtension!);
  } else if (attachment.updatedFields.updatedServerExtension != null) {
    return S().chat_team_notify_update_extension_server(
        attachment.updatedFields.updatedServerExtension!);
  } else if (attachment.updatedFields.updatedIcon != null) {
    return S().chat_team_notify_update_team_avatar;
  } else if (attachment.updatedFields.updatedInviteMode != null) {
    return S().chat_team_invitation_permission_update(
        attachment.updatedFields.updatedInviteMode!.name);
  } else if (attachment.updatedFields.updatedUpdateMode != null) {
    return S().chat_team_modify_resource_permission_update(
        attachment.updatedFields.updatedUpdateMode!.name);
  } else if (attachment.updatedFields.updatedBeInviteMode != null) {
    return S().chat_team_invited_id_verify_permission_update(
        attachment.updatedFields.updatedBeInviteMode!.name);
  } else if (attachment.updatedFields.updatedExtensionUpdateMode != null) {
    return S().chat_team_modify_extension_permission_update(
        attachment.updatedFields.updatedExtensionUpdateMode!.name);
  } else if (attachment.updatedFields.updatedAllMuteMode != null) {
    if (attachment.updatedFields.updatedAllMuteMode ==
        NIMTeamAllMuteModeEnum.cancel) {
      return S().chat_team_cancel_all_mute;
    } else {
      return S().chat_team_full_mute;
    }
  }
  return S().chat_message_unknown_notification;
}