RongIMLib View Markdown
    Preparing search index...

    Interface IUploadMessageOption

    文件消息配置

    interface IUploadMessageOption {
        isStatusMessage?: boolean;
        disableNotification?: boolean;
        pushContent?: string;
        pushData?: string;
        isMentioned?: boolean;
        mentionedType?: 1 | 2;
        mentionedUserIdList?: string[];
        directionalUserIdList?: string[];
        isVoipPush?: boolean;
        canIncludeExpansion?: boolean;
        expansion?: { [key: string]: string };
        isFilerWhiteBlacklist?: boolean;
        pushConfig?: IPushConfig;
        onSendBefore?: (message: IAReceivedMessage) => void;
        messageId?: number;
        auditInfo?: IAuditInfoKeyInMessage;
        disableUpdateLastMessage?: boolean;
        needReceipt?: boolean;
        quoteInfo?: IQuoteInfo;
        contentDisposition?: "inline" | "attachment";
    }

    Hierarchy

    Index
    isStatusMessage?: boolean

    是否是状态消息,一般为无需注册的自定义消息

    1. 状态消息只有 pub,没有 ack 应答
    2. 状态消息默认不存储,不计数,isPersited 与 isCounted 配置将失效

    请在注册消息时设置消息类型是否是状态消息

    disableNotification?: boolean

    是否发送静默消息

    当值为 true 时,服务器将不会发送 Push 信息,移动端也不会弹出本地通知提醒

    pushContent?: string

    Push 信息

    pushData?: string

    Push 通知携带的附加信息

    isMentioned?: boolean

    是否为 @ 消息

    mentionedType?: 1 | 2

    @ 消息类型

    1: @ 所有人 2: @ 指定用户

    推荐使用 content.mentionedInfo.type

    mentionedUserIdList?: string[]

    被 @ 的用户 Id 列表,当 mentionedType 值为 1 时,该值可为空

    推荐使用 content.mentionedInfo.userIdList

    directionalUserIdList?: string[]

    用于发送群定向消息,只当 conversationType 值为 群、超级群、讨论组、RTC 聊天室 时有效

    isVoipPush?: boolean

    当对方为 iOS 设备且未在线时,其将收到 Voip Push. 此配置对 Android 无影响

    canIncludeExpansion?: boolean

    消息是否支持拓展内容

    expansion?: { [key: string]: string }

    消息拓展内容数据

    isFilerWhiteBlacklist?: boolean

    黑/白名单

    功能未知,需确认

    pushConfig?: IPushConfig

    移动端推送配置

    onSendBefore?: (message: IAReceivedMessage) => void

    消息发送之前的回调

    messageId?: number

    重发消息时用到,重发消息的 messageId。 当要重发消息时所有参数需与原始消息参数一致,messageId 必须存在。 正常发消息时无需传该参数。

    消息审核配置

    disableUpdateLastMessage?: boolean

    禁止更新到会话最新一条消息,默认 false: 更新,true: 不更新

    needReceipt?: boolean

    是否需要回执,仅支持单、群聊会话类型内有效

    5.20.0

    使用该配置项需满足以下条件,否则发送消息将返回错误码 35056:

    1. 需服务端开启已读回执 v5 功能
    2. 仅限单聊、群聊会话类型可配置
    3. 状态消息,或不存储的消息类型不可配置
    4. 群内定向消息不可配置
    quoteInfo?: IQuoteInfo

    引用消息信息

    5.38.0

    contentDisposition?: "inline" | "attachment"

    文件链接在浏览器中展示形式(仅 aws、stc 上传有效) 'inline': 在浏览器中预览, 'attachment': 直接下载 不传:html 类型文件会预览,其他类型为直接下载