LiveLikeChatSession

Created by Shivansh Mittal on 2020-04-08.

Inheritors

Properties

Link copied to clipboard
abstract var avatarUrl: String?

Avatar Image Url

Link copied to clipboard
abstract var getCurrentChatRoom: () -> String

The current chat room

Functions

Link copied to clipboard
abstract fun clearMessages()

to clear chat messages

Link copied to clipboard
abstract fun close()

Closes the current session.

Link copied to clipboard
abstract fun connectToChatRoom(chatRoomId: String)

abstract fun connectToChatRoom(chatRoomId: String, callback: LiveLikeCallback<Unit>? = null, callbackWithSeverity: LiveLikeCallbackWithSeverity<Unit>? = null)

To connect to the chatRoom with provided chatRoomId, by default it will load initial messages

Link copied to clipboard
abstract fun deleteMessage(messageId: String, liveLikeCallback: LiveLikeCallback<LiveLikeEmptyResponse>)

Deletes a chat message with the specified message ID.

Link copied to clipboard
abstract fun getChatMessageReplies(getChatMessageRepliesRequestOption: GetChatMessageRepliesRequestOption? = null, callback: LiveLikeCallback<List<LiveLikeChatMessage>>? = null)

to get chat messages

Link copied to clipboard

to get the deleted messages from the loaded message

Link copied to clipboard

To get the loaded message

Link copied to clipboard
abstract fun getMessageCount(startTimestamp: Long, callback: LiveLikeCallback<Byte>)

Returns the number of messages published on a chatroom since a given time

Link copied to clipboard
abstract fun getPlayheadTime(): EpochTime

Return the playheadTime for this session.

Link copied to clipboard
abstract fun getReactions(liveLikeCallback: LiveLikeCallback<List<Reaction>>)

to get all the available reactions for use in chat

Link copied to clipboard
abstract fun getStickerPacks(liveLikeCallback: LiveLikeCallback<List<StickerPack>>)

to get all the available sticker packs

Link copied to clipboard

Checks whether the system is currently receiving real-time updates.

Link copied to clipboard
abstract fun loadNextHistory(limit: Int = 20, sinceMessageId: String? = null, callbackWithSeverity: LiveLikeCallbackWithSeverity<List<LiveLikeChatMessage>>? = null)

to load Chat History

Link copied to clipboard
abstract fun onBlockProfile(blockedInfo: BlockedInfo)
Link copied to clipboard
abstract fun onUnBlockProfile(blockInfoId: String, blockProfileId: String)
Link copied to clipboard
abstract fun pause()

Pause the current Chat and widget sessions. This generally happens when ads are presented

Link copied to clipboard
abstract fun quoteMessage(message: String?, parentMessageId: String? = null, imageUrl: String? = null, imageWidth: Int?, imageHeight: Int?, quoteMessageId: String, quoteMessage: LiveLikeChatMessage, messageMetadata: Map<String, Any?>? = null, attributes: List<LiveLikeChatAttributes>? = null, liveLikePreCallback: LiveLikeCallback<LiveLikeChatMessage>, chatInterceptor: ChatInterceptor? = null, callback: LiveLikeCallback<LiveLikeChatMessage>? = null)

Quotes a chat message with the provided details and sends it to the chat.

Link copied to clipboard
abstract fun removeMessageReactions(messageId: String, reactionId: String, liveLikeCallback: LiveLikeCallback<LiveLikeEmptyResponse>)

removes a reaction from a particular message.

Link copied to clipboard
abstract fun reportMessage(message: LiveLikeChatMessage, liveLikeCallback: LiveLikeCallback<LiveLikeEmptyResponse>)
abstract fun reportMessage(messageId: String, liveLikeCallback: LiveLikeCallback<LiveLikeEmptyResponse>)

Reports a message

Link copied to clipboard
abstract fun resume()

Resume the current Chat and widget sessions. This generally happens when ads are completed

Link copied to clipboard
abstract fun sendCustomChatMessage(customData: String, liveLikeCallback: LiveLikeCallback<LiveLikeChatMessage>)

send Custom Chat Message

Link copied to clipboard
abstract fun sendMessage(message: String?, parentMessageId: String? = null, imageUrl: String? = null, imageWidth: Int? = null, imageHeight: Int? = null, messageMetadata: Map<String, Any?>? = null, attributes: List<LiveLikeChatAttributes>? = null, liveLikePreCallback: LiveLikeCallback<LiveLikeChatMessage>, chatInterceptor: ChatInterceptor? = null, callback: LiveLikeCallback<LiveLikeChatMessage>? = null)

send Chat Message to the current ChatRoom

Link copied to clipboard
abstract fun sendMessageReaction(messageId: String, reactionId: String, liveLikeCallback: LiveLikeCallback<LiveLikeEmptyResponse>)

adds a reaction to a particular message.This supports multiple reaction also per user

Link copied to clipboard
abstract fun setChatRoomListener(chatRoomListener: ChatRoomListener?)

Register a chatRoom listener for the specified Chat Room

Link copied to clipboard
abstract fun setMessageListener(messageListener: MessageListener?)

Register a message count listner for the specified Chat Room

Link copied to clipboard
abstract fun setMessageWithReactionListener(messageWithReactionListener: MessageWithReactionListener?)