Callbacks reference
Every callback the package calls in your code, in one place.
ChatSessionEndEvent: { reason, message, code?, source } — reason is 'force_logout' | 'deactivated' | 'banned' | 'deleted' | 'workspace_deleted' | 'session_revoked', source is 'socket' | 'handshake' | 'rest', message is the short text also shown as a toast.
NotificationOpenTarget: {type: 'conversation', conversationId, isGroup?} | {type: 'thread', conversationId, threadRootId, isGroup?} | {type: 'call', callId, conversationId?}.
ForegroundNotification: the RealtimeX push data plus plain-text title and body.
ChatRoomActionContext: { conversationId, isGroup, receiverId?, title }.
typescriptsrc/configs/chat.config.ts
// src/configs/chat.config.ts — wiring the main callbacksimport {configurePushNotifications, onChatSessionEnd} from '@realtimexsco/live-chat-react-native'; export const chatConfig = { // …credentials onSessionEnd: ({reason, message}) => { console.log('Chat session ended', reason, message); }, ui: { chatRoom: { header: { onVideoCallPress: ({conversationId}) => { console.log('video call in', conversationId); return false; // false / undefined → the built-in call runs }, }, }, },}; const unsubscribe = onChatSessionEnd(event => console.log(event.source));