Options
All
  • Public
  • Public/Protected
  • All
Menu

系统通知的定义

Hierarchy

  • NIMSystemMessage

Index

Properties

apnsText?: string

自定义系统通知的推送文案, 仅对接收方为iOS设备有效

attach?: { custom?: string }

内建系统通知的附加信息, 参考系统通知类型来查看不同类型的系统通知对应的附加信息

Type declaration

  • Optional custom?: string

    附加消息的扩展字段

category?: string

内建系统通知的种类

cc?: boolean

自定义系统通知是否抄送. 默认 true

content?: string

自定义系统通知的内容。注意该内容必须为可以被JSON.parse的字符串

内建系统通知的state 为 'error' 时, 此字段包含错误的信息

from: string

系统通知的来源, 账号或者群ID

idServer?: string

内建系统通知的 idServer

isPushable?: boolean

是否需要推送

localCustom?: string

内建系统通知的本地数据库自定义扩展字段

注:打开 db 时,才存在这个字段。

needPushNick?: boolean

是否需要推送昵称

ps?: string

内建系统通知的附言

pushPayload?: string

自定义系统通知的推送属性

注:推荐传入 JSON 格式化字符串

read?: boolean

内建系统通知是否已读

scene?: string

自定义系系统通知的场景, 参考消息场景

sendToOnlineUsersOnly?: boolean

自定义系统通知是否只发送给在线用户

true 只发送给在线用户, 适合发送即时通知, 比如正在输入。

false 时假如目标用户或群不在线, 会在其上线后推送过去。

注:该参数只对 p2p 自定义系统通知有效, 对群自定义系统通知无效, 群自定义系统通知只会发给在线的群成员, 不会存离线。

state?: string

内建系统通知的state

time: number

时间戳

to: string

系统通知的目标, 账号或者群ID

type: "custom" | "addFriend" | "applyFriend" | "passFriendApply" | "rejectFriendApply" | "deleteFriend" | "teamInvite" | "rejectTeamInvite" | "applyTeam" | "rejectTeamApply" | "applySuperTeam" | "rejectSuperTeamApply" | "superTeamInvite" | "rejectSuperTeamInvite" | "deleteMsg"

系统通知类型