• Parameters

    Returns {
        deleteMessage: ((message: FileMessage | UserMessage) => Promise<void>);
        hasNext: (() => boolean);
        hasPrev: (() => boolean);
        loading: boolean;
        messages: SendbirdMessage[];
        newMessages: SendbirdMessage[];
        newMessagesFromMembers: SendbirdMessage[];
        next: (() => Promise<void>);
        nextMessages: SendbirdMessage[];
        prev: (() => Promise<void>);
        refresh: (() => Promise<void>);
        refreshing: boolean;
        resendMessage: ((failedMessage: FileMessage | UserMessage) => Promise<void>);
        resetNewMessages: (() => void);
        sendFileMessage: ((params: FileMessageCreateParams, onPending?: ((message: FileMessage, error?: SendbirdError) => void)) => Promise<FileMessage>);
        sendUserMessage: ((params: UserMessageCreateParams, onPending?: ((message: UserMessage, error?: SendbirdError) => void)) => Promise<UserMessage>);
        updateFileMessage: ((messageId: number, params: BaseMessageUpdateParams) => Promise<FileMessage>);
        updateUserMessage: ((messageId: number, params: UserMessageUpdateParams) => Promise<UserMessage>);
    }

    • deleteMessage: ((message: FileMessage | UserMessage) => Promise<void>)
        • (message: FileMessage | UserMessage): Promise<void>
        • Delete message

          Returns

          Parameters

          • message: FileMessage | UserMessage

            sent or failed message

          Returns Promise<void>

    • hasNext: (() => boolean)
        • (): boolean
        • Check if there are more next messages to fetch

          Returns

          Returns boolean

    • hasPrev: (() => boolean)
        • (): boolean
        • Check if there are more prev messages to fetch

          Returns

          Returns boolean

    • loading: boolean

      Loading state, only available on first render

    • messages: SendbirdMessage[]

      Get messages, this state is for render For example, if a user receives a new messages while searching for an old message for this case, new messages will be included here.

      Returns

    • newMessages: SendbirdMessage[]

      A new message means a message that meets the below conditions

      • Not admin message
      • Not updated message
      • Not current user's message
    • newMessagesFromMembers: SendbirdMessage[]

      Deprecated

      Please use newMessages instead *

    • next: (() => Promise<void>)
        • (): Promise<void>
        • Fetch next messages to state

          Returns

          Returns Promise<void>

    • nextMessages: SendbirdMessage[]

      Deprecated

      Please use newMessages instead *

    • prev: (() => Promise<void>)
        • (): Promise<void>
        • Fetch prev messages to state

          Returns

          Returns Promise<void>

    • refresh: (() => Promise<void>)
        • (): Promise<void>
        • Refresh, clear and reload messages from latest

          Returns

          Returns Promise<void>

    • refreshing: boolean

      Refreshing state, status is changes when the refresh is called.

    • resendMessage: ((failedMessage: FileMessage | UserMessage) => Promise<void>)
        • (failedMessage: FileMessage | UserMessage): Promise<void>
        • Resend failed message

          Returns

          Parameters

          • failedMessage: FileMessage | UserMessage

            failed message to resend

          Returns Promise<void>

    • resetNewMessages: (() => void)
        • (): void
        • Reset new messages

          Returns void

    • sendFileMessage: ((params: FileMessageCreateParams, onPending?: ((message: FileMessage, error?: SendbirdError) => void)) => Promise<FileMessage>)
        • (params: FileMessageCreateParams, onPending?: ((message: FileMessage, error?: SendbirdError) => void)): Promise<FileMessage>
        • Send file message

          Returns

          pending message

          Parameters

          • params: FileMessageCreateParams

            file message params

          • Optional onPending: ((message: FileMessage, error?: SendbirdError) => void)
              • (message: FileMessage, error?: SendbirdError): void
              • Parameters

                • message: FileMessage
                • Optional error: SendbirdError

                Returns void

          Returns Promise<FileMessage>

    • sendUserMessage: ((params: UserMessageCreateParams, onPending?: ((message: UserMessage, error?: SendbirdError) => void)) => Promise<UserMessage>)
        • (params: UserMessageCreateParams, onPending?: ((message: UserMessage, error?: SendbirdError) => void)): Promise<UserMessage>
        • Send user message

          Returns

          pending message

          Parameters

          • params: UserMessageCreateParams

            user message params

          • Optional onPending: ((message: UserMessage, error?: SendbirdError) => void)
              • (message: UserMessage, error?: SendbirdError): void
              • Parameters

                • message: UserMessage
                • Optional error: SendbirdError

                Returns void

          Returns Promise<UserMessage>

    • updateFileMessage: ((messageId: number, params: BaseMessageUpdateParams) => Promise<FileMessage>)
        • (messageId: number, params: BaseMessageUpdateParams): Promise<FileMessage>
        • Update file message

          Returns

          updated message

          Parameters

          • messageId: number
          • params: BaseMessageUpdateParams

            file message params

          Returns Promise<FileMessage>

    • updateUserMessage: ((messageId: number, params: UserMessageUpdateParams) => Promise<UserMessage>)
        • (messageId: number, params: UserMessageUpdateParams): Promise<UserMessage>
        • Update user message

          Returns

          updated message

          Parameters

          • messageId: number
          • params: UserMessageUpdateParams

            user message params

          Returns Promise<UserMessage>

Generated using TypeDoc