Interface UseOpenChannelMessages Use Open Channel Messages ( sdk , channel , userId ? , options ? ) : { deleteMessage : ( ( message ) => Promise < void > ) ; hasNext : ( ( ) => boolean ) ; hasPrev : ( ( ) => boolean ) ; loading : boolean ; messages : SendbirdMessage [] ; newMessages : SendbirdMessage [] ; next : ( ( ) => Promise < void > ) ; prev : ( ( ) => Promise < void > ) ; refresh : ( ( ) => Promise < void > ) ; refreshing : boolean ; resendMessage : ( ( failedMessage ) => Promise < void > ) ; resetNewMessages : ( ( ) => void ) ; sendFileMessage : ( ( params , onPending ? ) => Promise < FileMessage > ) ; sendUserMessage : ( ( params , onPending ? ) => Promise < UserMessage > ) ; updateFileMessage : ( ( messageId , params ) => Promise < FileMessage > ) ; updateUserMessage : ( ( messageId , params ) => Promise < UserMessage > ) ; } Parameters sdk : SendbirdChatSDK channel : OpenChannel Optional
userId : string Returns { deleteMessage : ( ( message ) => Promise < void > ) ; hasNext : ( ( ) => boolean ) ; hasPrev : ( ( ) => boolean ) ; loading : boolean ; messages : SendbirdMessage [] ; newMessages : SendbirdMessage [] ; next : ( ( ) => Promise < void > ) ; prev : ( ( ) => Promise < void > ) ; refresh : ( ( ) => Promise < void > ) ; refreshing : boolean ; resendMessage : ( ( failedMessage ) => Promise < void > ) ; resetNewMessages : ( ( ) => void ) ; sendFileMessage : ( ( params , onPending ? ) => Promise < FileMessage > ) ; sendUserMessage : ( ( params , onPending ? ) => Promise < UserMessage > ) ; updateFileMessage : ( ( messageId , params ) => Promise < FileMessage > ) ; updateUserMessage : ( ( messageId , params ) => Promise < UserMessage > ) ; } delete Message : ( ( message ) => Promise < void > ) ( message ) : Promise < void > Parameters message : FileMessage | UserMessage Returns Promise < void > has Next : ( ( ) => boolean ) ( ) : boolean Returns boolean has Prev : ( ( ) => boolean ) ( ) : boolean Returns boolean loading : boolean messages : SendbirdMessage [] new Messages : SendbirdMessage [] next : ( ( ) => Promise < void > ) ( ) : Promise < void > Returns Promise < void > prev : ( ( ) => Promise < void > ) ( ) : Promise < void > Returns Promise < void > refresh : ( ( ) => Promise < void > ) ( ) : Promise < void > Returns Promise < void > refreshing : boolean resend Message : ( ( failedMessage ) => Promise < void > ) ( failedMessage ) : Promise < void > Parameters failedMessage : FileMessage | UserMessage Returns Promise < void > reset New Messages : ( ( ) => void ) send File Message : ( ( params , onPending ? ) => Promise < FileMessage > ) ( params , onPending ? ) : Promise < FileMessage > Parameters params : FileMessageCreateParams Optional
onPending : ( ( message , error ? ) => void ) ( message , error ? ) : void Parameters message : FileMessage Optional
error : SendbirdError Returns void Returns Promise < FileMessage > pending message
send User Message : ( ( params , onPending ? ) => Promise < UserMessage > ) ( params , onPending ? ) : Promise < UserMessage > Parameters params : UserMessageCreateParams Optional
onPending : ( ( message , error ? ) => void ) ( message , error ? ) : void Parameters message : UserMessage Optional
error : SendbirdError Returns void Returns Promise < UserMessage > pending message
update File Message : ( ( messageId , params ) => Promise < FileMessage > ) ( messageId , params ) : Promise < FileMessage > Parameters messageId : number params : FileMessageUpdateParams Returns Promise < FileMessage > updated message
update User Message : ( ( messageId , params ) => Promise < UserMessage > ) ( messageId , params ) : Promise < UserMessage > Parameters messageId : number params : UserMessageUpdateParams Returns Promise < UserMessage > updated message
UseOpenChannelMessages
Description
interface for open channel messages hook