Options
All
  • Public
  • Public/Protected
  • All
Menu

Module SystemMessageServiceInterface

Index

Type Aliases

SendCustomSysMsgOptions: { attach: string; pushInfo?: TSysMsgPushInfo; setting?: TSysMsgSetting; to: string; type: "customP2p" | "customTeam" | "customSuperTeam" }

Type declaration

  • attach: string

    内建系统通知的附加信息, JSON 格式化的字符串

  • Optional pushInfo?: TSysMsgPushInfo

    推送相关字段设置

  • Optional setting?: TSysMsgSetting

    消息其他相关字段

  • to: string

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

  • type: "customP2p" | "customTeam" | "customSuperTeam"

    系统通知类型 自定义消息只能选择 'customP2p' | 'customTeam' | 'customSuperTeam'

SystemMessage: { antiSpamInfo?: TSystemMessageAntiSpamInfo; attach?: StrAnyObj; callbackExt?: string; content?: string; feature: TSysMsgFeature; from: string; idServer: string; opeAccount?: string; pushInfo?: TSysMsgPushInfo; recallMessageInfo?: TSysMsgRecallMsgInfo; setting?: TSysMsgSetting; state?: TSystemMessageStatus; time: number; to: string; type: TSystemMessageType }

Type declaration

  • Optional antiSpamInfo?: TSystemMessageAntiSpamInfo

    反垃圾设置

  • Optional attach?: StrAnyObj

    内建系统通知的附加信息

  • Optional callbackExt?: string

    服务器第三方回调的扩展字段

  • Optional content?: string

    内建系统通知的附言

  • feature: TSysMsgFeature

    通知属性

  • from: string

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

  • idServer: string

    内建系统通知的 idServer

  • Optional opeAccount?: string

    执行操作的账号,例如群管理员撤回消息,那就是管理员 accid

  • Optional pushInfo?: TSysMsgPushInfo

    推送设置

  • Optional recallMessageInfo?: TSysMsgRecallMsgInfo

    撤回消息的相关字段

  • Optional setting?: TSysMsgSetting

    通知的其他相关字段

  • Optional state?: TSystemMessageStatus

    系统通知的状态

  • time: number

    时间戳

  • to: string

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

  • type: TSystemMessageType

    系统通知类型

    群有关的如 teamInvite、rejectTeamInvite、applyTeam ... 好友的如 applyFriend、passFriendApply、rejectFriendApply.... 超大群的略 其他的撤回消息、自定义的系统通知等类型。

TSysMsgFeature: keyof typeof ESysMsgFeature
TSysMsgPushInfo: { forcePushIDsList?: string; needForcePush?: boolean; needPush?: boolean; needPushBadge?: boolean; needPushNick?: boolean; pushApnsText?: string; pushContent?: string; pushPayload?: string }

Type declaration

  • Optional forcePushIDsList?: string

    强推的成员账号

    例:JSON.stringify(['id1', 'id2']) 注:如果要设置为强推所有成员,则将此参数设置为 "#%@all@%#"

  • Optional needForcePush?: boolean

    是否强推(可扩展为区别于普通推送的推送形式)在发自定义系统通知时默认为0

  • Optional needPush?: boolean

    是否需要推送

  • Optional needPushBadge?: boolean

    是否要做消息计数(推送的角标)

  • Optional needPushNick?: boolean

    需要推送昵称

  • Optional pushApnsText?: string

    推送文本,不填则不推送

  • Optional pushContent?: string

    强推文本(可扩展为区别与普通推送的推送文本),长度限制150字节

  • Optional pushPayload?: string

    自定义的推送属性,长度2048

TSysMsgRecallMsgInfo: { createTime: number; fromNick: string; idClient: string; idServer: string; opeAccount?: string }

Type declaration

  • createTime: number

    撤回消息的createtime

  • fromNick: string

    要撤回消息发送者的nick

  • idClient: string

    消息撤回需要透传给回客户端用的字段

  • idServer: string

    要撤回消息的server_msgid

  • Optional opeAccount?: string

    执行操作的账号,例如群管理员撤回消息,填写管理员 account id

TSysMsgSetting: { envConfig?: string; isRoutable?: boolean; needSaveOffline?: boolean }

Type declaration

  • Optional envConfig?: string

    (可选) 指向自定义抄送的配置

  • Optional isRoutable?: boolean

    该消息是否抄送。默认按照app的路由开关。

    注:消息路由,又称消息抄送,App 的消息在云信通道中经过的同时会抄送一份到 App 自己的服务器用于备案等;

  • Optional needSaveOffline?: boolean

    自定义消息是否存入离线

    true 若目标用户不在线, 会在其上线后推送过去。 false 只发送给在线用户, 比如说 “正在输入” 这种即时通知。

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

TSystemMessageAntiSpamInfo: { antiSpamContent?: string; needAntiSpam?: boolean }

Type declaration

  • Optional antiSpamContent?: string

    (可选)开发者自定义的反垃圾字段。格式如 '{"type":1,"data":"YOUR_DATA_KEY"}'

  • Optional needAntiSpam?: boolean

    (功能暂时不开放)是否需要使用自定义反垃圾字段 antiSpamContent, 缺省false 注:此字段与 antiSpamContent 联合起来使用

TSystemMessageStatus: keyof typeof ESystemMessageStatus
TSystemMessageType: keyof typeof ESystemMessageType

Variables

ESystemMessageType: { applySuperTeam: number; applyTeam: number; customP2p: number; customSuperTeam: number; customTeam: number; deleteFriend: number; deleteMsgP2pOneWay: number; deleteMsgTeamOneWay: number; friendRequest: number; recallMsgP2p: number; recallMsgSuperTeam: number; recallMsgTeam: number; rejectSuperTeamApply: number; rejectSuperTeamInvite: number; rejectTeamApply: number; rejectTeamInvite: number; superTeamInvite: number; teamInvite: number } = ...

Type declaration

  • applySuperTeam: number
  • applyTeam: number

    team 相关 (某人)申请入群

  • customP2p: number

    自定义系统通知相关

  • customSuperTeam: number
  • customTeam: number
  • deleteFriend: number

    friend 相关

    删除好友

  • deleteMsgP2pOneWay: number

    msg 相关 单向删除点对点消息

  • deleteMsgTeamOneWay: number

    msg 相关 单向删除群消息

  • friendRequest: number

    friend 相关

    好友申请

    此系统消息的 attach.type 会标识它是 addFriend, applyFriend, passFriendApply, rejectFriendApply 中的一种来做区分

  • recallMsgP2p: number

    msg 相关 撤回消息

  • recallMsgSuperTeam: number

    msg 相关 撤回超大群消息

  • recallMsgTeam: number

    msg 相关 撤回群消息

  • rejectSuperTeamApply: number
  • rejectSuperTeamInvite: number
  • rejectTeamApply: number

    team 相关 (管理员)拒绝申请入群

  • rejectTeamInvite: number

    team 相关 (某人)拒绝邀请

  • superTeamInvite: number
  • teamInvite: number

    team 相关 (管理员)邀请某人