Interface SessionInterface
Methods
addStickTopSession
- addStickTopSession(options: { id: string; topCustom?: string; done: any }): void
Parameters
options: { id: string; topCustom?: string; done: any }
id: string
Optional topCustom?: string
done:function
Returns void
deleteLocalSession
- deleteLocalSession(options: { id: string; isDeleteRoaming?: boolean; isLogic?: boolean; done?: any }): void
Parameters
options: { id: string; isDeleteRoaming?: boolean; isLogic?: boolean; done?: any }
id: string
Optional isDeleteRoaming?: boolean
Optional isLogic?: boolean
done?:function
Returns void
deleteSession
- deleteSession(options: { scene: "p2p" | "team" | "superTeam"; to: string; done?: any }): void
Parameters
options: { scene: "p2p" | "team" | "superTeam"; to: string; done?: any }
scene: "p2p" | "team" | "superTeam"
to: string
done?:function
Returns void
deleteSessions
- deleteSessions(options: { sessions: NIMSession[]; done?: any }): void
deleteSessionsWithMoreRoaming
- deleteSessionsWithMoreRoaming(options: { id: string; done?: any }): void
Parameters
options: { id: string; done?: any }
Returns void
deleteStickTopSession
- deleteStickTopSession(options: { id: string; done: any }): void
Parameters
options: { id: string; done: any }
Returns void
getLocalSession
- getLocalSession(options: { sessionId: string; done: any }): void
Parameters
options: { sessionId: string; done: any }
sessionId: string
done:function
Returns void
getLocalSessions
- getLocalSessions(options: { lastSessionId?: string; limit?: number; reverse?: boolean; done: any }): void
Parameters
options: { lastSessionId?: string; limit?: number; reverse?: boolean; done: any }
Optional lastSessionId?: string
Optional limit?: number
Optional reverse?: boolean
done:function
Returns void
getLocalSessionsByMsgType
getSessionsWithMoreRoaming
- getSessionsWithMoreRoaming(options: { id: string; done?: any }): void
Parameters
options: { id: string; done?: any }
Returns void
getStickTopSessions
- getStickTopSessions(options: { done: any }): void
insertLocalSession
- insertLocalSession(options: { scene: "p2p" | "team" | "superTeam"; to: string; done?: any }): void
Parameters
options: { scene: "p2p" | "team" | "superTeam"; to: string; done?: any }
scene: "p2p" | "team" | "superTeam"
to: string
done?:function
Returns void
resetAllSessionUnread
- resetAllSessionUnread(): void
resetCurrSession
- resetCurrSession(sessionId: string): void
resetSessionUnread
- resetSessionUnread(sessionId: string, done: (err: null | Error, failedSessionId: string) => void): void
Parameters
sessionId: string
done: (err: null | Error, failedSessionId: string) => void
- (err: null | Error, failedSessionId: string): void
Parameters
err: null | Error
failedSessionId: string
Returns void
Returns void
resetSessionsUnread
- resetSessionsUnread(sessionIds: string[], done: (err: null | Error) => void): Promise<void>
Parameters
sessionIds: string[]
done: (err: null | Error) => void
- (err: null | Error): void
Returns Promise<void>
resetSuperTeamSessionsUnread
- resetSuperTeamSessionsUnread(sessionIds: string[], done: (err: null | Error) => void): Promise<void>
Parameters
sessionIds: string[]
done: (err: null | Error) => void
- (err: null | Error): void
Returns Promise<void>
setCurrSession
- setCurrSession(sessionId: string): void
updateLocalSession
- updateLocalSession(options: { id: string; localCustom?: string; needNotify?: boolean; done?: any }): void
Parameters
options: { id: string; localCustom?: string; needNotify?: boolean; done?: any }
id: string
Optional localCustom?: string
Optional needNotify?: boolean
done?:function
Returns void
updateSessionsWithMoreRoaming
- updateSessionsWithMoreRoaming(options: { msg: NIMMessage; done?: any }): void
updateStickTopSession
- updateStickTopSession(options: { id: string; topCustom?: string; done: any }): void
Parameters
options: { id: string; topCustom?: string; done: any }
id: string
Optional topCustom?: string
done:function
Returns void
添加云端置顶的会话。下次登录时,在初始化回调函数
onStickTopSessions
接收置顶会话列表。调用后,当前账户所有登录用户收到onupdatesessions
回调关联函数