Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IMEventInterface

Example:

const instance = new SDK()

instance.on('logined', loginResult => { console.log(loginResult.connectionId) }

Hierarchy

  • IMEventInterface

Index

Properties

addSuperTeamMembers: [result: { accounts: string[]; members: SuperTeamMember[]; team: SuperTeam }]

超级群添加

addTeamMembers: [addTeamMembersResult: { accounts: string[]; members: TeamMember[]; team: Team }]

收到了群成员的更新

broadcastMsgs: [msgs: NIM_BroadcastMessage[]]

收到广播消息(在线或者离线同步收到均会触发)

clearServerHistoryMsgs: [result: { sessionId: string; time: number }[]]

在初始化同步/多端同步时,收到了清除历史消息的通知

createTeam: [team: Team, owner: StrAnyObj]

收到了多端同步创建群的情况

owner 群的所有者

deleteSelfMsgs: [result: DeleteSelfMsgsResult[]]

收到了单向删除某消息的通知

disconnect: []

连接断开

dismissSuperTeam: [result: { teamId: string }]

超级群解散

dismissTeam: [result: { teamId: string }]

触发了解散群

friends: [friends: FriendProfile[]]

同步时收到了好友相关资料

kicked: [kickedReason: TKickedReason]

被踢下线

logined: [loginResult: LoginResult]

初始化成功登陆

msg: [msg: IMMessage]

收到消息

multiPortLogin: [multiLoginResults: MultiPortLoginResult[]]

多端登陆通知

multiSyncUpdateCloudSession: [result: NIMECloudSession]

多端同步更新远端会话,cloudSession 模块专属

proxyMsg: [proxyMsg: TProxyMsg]

收到了代理消息(透传的)

pushEvents: [events: PushEvent[]]

收到了订阅事件

relations: [relations: Relations]

同步收到的关系,包括黑名单和静音列表

removeSuperTeamMembers: [result: { accounts: string[]; team: SuperTeam }]

移除超级群成员

removeTeamMembers: [result: { accounts: string[]; team: Team }]

收到成员离群,例如成员 A 调用了 leaveTeam 离群,其他成员会收到这个事件。

sessions: [sessions: Session[]]

同步时收到了会话

superTeams: [teams: SuperTeam[]]

收到了初始化同步的群

syncFriend: [result: IMEventSyncFriendResult]

多端同步时收到了好友相关的资料

syncMyNameCard: [syncMyNameCardResult: UserNameCard]

同步时收到了个人信息

syncOfflineMsgs: [syncRoamingMsgsResult: SyncOfflineMsgsResult]

同步时收到了离线消息

syncRoamingMsgs: [syncRoamingMsgsResult: SyncRoamingMsgsResult]

同步时收到了漫游消息

syncSysMsgs: [sysMsgs: SystemMessage[]]

同步漫游/离线时收到的系统消息

syncdone: []

同步完成事件

sysMsg: [sysMsg: SystemMessage]

在线时收到了系统通知

teamMsgReceipts: [msgReceipts: TeamMsgReceipt[]]

收到了群已读

teams: [teams: Team[]]

收到了初始化同步的群

transferSuperTeam: [result: { from: { account: string; id: string; type: SuperTeamMemberType; updateTime: number }; team: SuperTeam; to: { account: string; id: string; type: SuperTeamMemberType; updateTime: number } }]

触发转让超级群事件

transferTeam: [tranferTeamResult: TTransferTeamResult]

收到了转让群

updateBlackList: [updateBlackListResult: { account: string; isAdd: boolean }]

收到了黑名单更新通知

updateMuteList: [updateMuteListResult: { account: string; isAdd: boolean }]

收到了静音列表更新通知

updateMyNameCard: [myNameCard: UserNameCard]

收到了更新个人信息通知

updateSession: [session: Session]

会话更新

updateSuperTeam: [team: SuperTeam]

超级群更新

updateSuperTeamManagers: [updateSuperTeamManagersResult: TUpdateSuperTeamManagersResult]

超级群管理员更新

updateSuperTeamMember: [teamMember: SuperTeamMember]

超级群成员更新的多端同步

updateSuperTeamMembersMute: [result: { accounts: string[]; members: { account: string; id: string; mute: boolean; teamId: string; updateTime: number }[]; mute: boolean; team: SuperTeam }]

超级群成员静音事件

updateSystemMessages: [result: { from: string; idServer: string; state: "read" | "deleted" | "none" | "pass" | "decline" | "invalid"; type: "applyTeam" | "rejectTeamApply" | "teamInvite" | "rejectTeamInvite" | "friendRequest" | "deleteFriend" | "recallMsgP2p" | "recallMsgTeam" | "recallMsgSuperTeam" | "deleteMsgP2pOneWay" | "deleteMsgTeamOneWay" | "applySuperTeam" | "rejectSuperTeamApply" | "superTeamInvite" | "rejectSuperTeamInvite" | "customP2p" | "customTeam" | "customSuperTeam" }[]]

收到了系统消息

updateTeam: [team: Team]

收到了群的更新信息

updateTeamManagers: [updateTeamManagersResult: TUpdateTeamManagersResult]

收到了群管理员的更新

updateTeamMember: [member: TeamMember]

收到了多端同步来更新群成员的情况

updateTeamMembersMute: [result: TUpdateTeamMembersMute]

收到了更新群成员静音

users: [users: UserNameCard[]]

同步时收到了其他用户相关资料

willReconnect: [params: TWillReconnect]

开始自动重连