Class Conversation
- 
                    
                    - All Implemented Interfaces:
 
 public class ConversationThe entity of a conversation, used to contain and store the client's conversation information, corresponding to the conversation in the conversation list. 
- rongcloud 
 
- 
                
                    
                    - 
                                
                            
                                Nested Class SummaryNested Classes Modifier and Type Class Description public enumConversation.PublicServiceTypeEnumeration of public service types. public enumConversation.ConversationTypeConversation type enumeration. public enumConversation.ConversationNotificationStatusConversation reminder status. 
 - 
                                
                            
                                Field SummaryFields Modifier and Type Field Description public Conversation.ConversationTypeconversationTypepublic StringtargetIdpublic StringchannelIdpublic StringconversationTitlepublic StringportraitUrlpublic intunreadMessageCountpublic booleanisToppublic booleanisTopForTagpublic longoperationTimepublic StringsenderUserNamepublic Stringdraftpublic Conversation.ConversationNotificationStatusnotificationStatuspublic intmentionedCountpublic intpushNotificationLevelpublic IRongCoreEnum.UltraGroupChannelTypechannelTypepublic longfirstUnreadMsgSendTimepublic final static Creator<Conversation>CREATOR
 - 
                                
                            
                                Constructor SummaryConstructors Constructor Description Conversation()Default constructor. Conversation(Parcel in)
 - 
                                
                            
                                Method SummaryModifier and Type Method Description Conversation.ConversationTypegetConversationType()Retrieves the conversation type. voidsetConversationType(Conversation.ConversationType conversationType)Sets the conversation type. StringgetTargetId()Retrieves the conversation ID. voidsetTargetId(String targetId)Sets the conversation ID. StringgetChannelId()The business identifier of the conversation to which the message belongs. voidsetChannelId(String channelId)Sets the business identifier of the conversation to which the message belongs. StringgetConversationTitle()Get the conversation title. voidsetConversationTitle(String conversationTitle)Sets the conversation title. StringgetPortraitUrl()Get the conversation avatar URL voidsetPortraitUrl(String portraitUrl)Sets the conversation avatar URL intgetUnreadMessageCount()Get the count of unread messages. voidsetUnreadMessageCount(int unreadMessageCount)Sets the unread message count. booleanisTop()Retrieves the pinned status. voidsetTop(boolean isTop)Sets the pinned status. booleanisTopForTag()Retrieves the pinned status of the current conversation under this tag. voidsetTopForTag(boolean isTopForTag)Sets the pinned status of the current conversation under this tag. longgetOperationTime()Gets the operation timestamp (Unix timestamp in milliseconds) for this conversation, used as the timestamp parameter when paginating through the conversation list. voidsetOperationTime(long operationTime)Sets the operation time for this conversation (Unix timestamp in milliseconds). StringgetSenderUserName()Retrieves the name of the user who sent the message. voidsetSenderUserName(String senderUserName)Sets the username of the message sender. StringgetDraft()Retrieves the draft present in the conversation. voidsetDraft(String draft)Sets the draft in the conversation. Conversation.ConversationNotificationStatusgetNotificationStatus()Retrieves the message notification status. voidsetNotificationStatus(Conversation.ConversationNotificationStatus notificationStatus)Sets the status for retrieving notification messages. intgetMentionedCount()Retrieves the count of unread messages in this conversation where you were mentioned. voidsetMentionedCount(int count)Sets the count of unread @ messages in this conversation. intgetPushNotificationLevel()Get the Do Not Disturb notification level voidsetPushNotificationLevel(int pushNotificationLevel)Sets the Do Not Disturb notification level IRongCoreEnum.UltraGroupChannelTypegetChannelType()Retrieves the channel type of the ultra group conversation. voidsetChannelType(IRongCoreEnum.UltraGroupChannelType channelType)Sets the channel type for the ultra group conversation longgetFirstUnreadMsgSendTime()Gets the timestamp of the first unread message in the conversation (Unix timestamp in milliseconds). voidsetFirstUnreadMsgSendTime(long firstUnreadMsgSendTime)Sets the timestamp of the first unread message in the conversation (Unix timestamp, in milliseconds). static Conversationobtain(Conversation.ConversationType type, String id, String title)Constructor. voidwriteToParcel(Parcel dest, int flags)intdescribeContents()ReceivedStatusgetReceivedStatus()Retrieves the receipt status of the last message in the conversation. voidsetReceivedStatus(ReceivedStatus receivedStatus)Sets the received status of the last message in the conversation. SentStatusgetSentStatus()Retrieves the send status of the last message in the conversation. voidsetSentStatus(SentStatus sentStatus)Sets the sending status of the last message in the conversation. longgetReceivedTime()Retrieves the receive time of the last message in the conversation (Unix timestamp in milliseconds). voidsetReceivedTime(long receivedTime)Sets the received time of the last message in the conversation (Unix timestamp in milliseconds). longgetSentTime()Get the sending time of the last message in the conversation (Unix timestamp, milliseconds) The sending time is the server time when the message arrives at the server from the sending client. voidsetSentTime(long sentTime)Sets the sent time of the last message in the conversation (Unix timestamp in milliseconds). StringgetObjectName()Gets the name of the message object. voidsetObjectName(String objectName)Sets the name of the message object. StringgetSenderUserId()Retrieves the user ID of the message sender. voidsetSenderUserId(String senderUserId)Sets the user ID of the message sender. intgetLatestMessageId()Retrieves the ID of the last message in this conversation. voidsetLatestMessageId(int latestMessageId)Sets the ID of the last message in this conversation. MessageContentgetLatestMessage()Retrieves the content of the last message in the conversation. voidsetLatestMessage(MessageContent latestMessageContent)Sets the content of the last message in the conversation. intgetUnreadMentionedCount()Get the count of unread @ mentions in this conversation. intgetUnreadMentionedMeCount()Retrieves the count of unread messages in this conversation where only you are mentioned. MessageDirectiongetLatestMessageDirection()Retrieves the message direction. voidsetLatestMessageDirection(MessageDirection latestMessageDirection)Sets the message direction. StringgetLatestMessageExtra()Retrieve the additional information of the message. voidsetLatestMessageExtra(String latestMessageExtra)Sets the additional information for the message. StringgetLatestMessageUId()Retrieves the unique message ID from the server (globally unique within the same AppKey). voidsetLatestMessageUId(String latestMessageUId)Sets the server message unique ID (globally unique within the same AppKey). ReadReceiptInfogetLatestMessageReadReceiptInfo()Retrieves the read receipt status of the last message. voidsetLatestMessageReadReceiptInfo(ReadReceiptInfo latestMessageReadReceiptInfo)Sets the read receipt status of the last message MessageConfiggetLatestMessageConfig()Retrieves the message configuration. voidsetLatestMessageConfig(MessageConfig latestMessageConfig)Set message configuration booleanisLatestCanIncludeExpansion()Indicates whether the message can contain extended information. voidsetLatestCanIncludeExpansion(boolean latestCanIncludeExpansion)Sets whether the message can include extended information Map<String, String>getLatestExpansion()Retrieves the list of expansion information for the last message. voidsetLatestExpansion(Map<String, String> latestExpansion)Sets the latest message expansion information list. MessagegetMessage()Retrieves the latest message of the conversation voidsetMessage(Message latestMessage)The LatestMessage of the conversation voidsetMentionedMeCount(int count)Sets the count of unread @ messages in this conversation that are only for the current user. - 
                    
                    
                    - 
                                
                            
                                Method Detail- 
                                        getConversationTypeConversation.ConversationType getConversationType() Retrieves the conversation type. - Returns:
- The conversation type. 
 
 - 
                                        setConversationTypevoid setConversationType(Conversation.ConversationType conversationType) Sets the conversation type. - Parameters:
- conversationType- Specifies the conversation type.
 
 - 
                                        getTargetIdString getTargetId() Retrieves the conversation ID. Depending on the conversationType, it could be a chat ID, discussion group ID, group ID, or chatroom ID. - Returns:
- The conversation ID. 
 
 - 
                                        setTargetIdvoid setTargetId(String targetId) Sets the conversation ID. Depending on the conversationType, this could be a chat ID, discussion group ID, group ID, or chatroom ID. - Parameters:
- targetId- The conversation ID.
 
 - 
                                        getChannelIdString getChannelId() The business identifier of the conversation to which the message belongs. - Returns:
- The business identifier of the conversation to which the message belongs. 
 
 - 
                                        setChannelIdvoid setChannelId(String channelId) Sets the business identifier of the conversation to which the message belongs. The maximum length is 20 characters. - Parameters:
- channelId- The business identifier of the conversation to which the message belongs.
 
 - 
                                        getConversationTitleString getConversationTitle() Get the conversation title. - Returns:
- The conversation title. 
 
 - 
                                        setConversationTitlevoid setConversationTitle(String conversationTitle) Sets the conversation title. - Parameters:
- conversationTitle- The title of the conversation.
 
 - 
                                        getPortraitUrlString getPortraitUrl() Get the conversation avatar URL - Returns:
- The conversation avatar URL 
 
 - 
                                        setPortraitUrlvoid setPortraitUrl(String portraitUrl) Sets the conversation avatar URL - Parameters:
- portraitUrl- The URL of the conversation avatar
 
 - 
                                        getUnreadMessageCountint getUnreadMessageCount() Get the count of unread messages. - Returns:
- The count of unread messages. 
 
 - 
                                        setUnreadMessageCountvoid setUnreadMessageCount(int unreadMessageCount) Sets the unread message count. - Parameters:
- unreadMessageCount- The count of unread messages.
 
 - 
                                        isTopboolean isTop() Retrieves the pinned status. - Returns:
- The pinned status. 
 
 - 
                                        setTopvoid setTop(boolean isTop) Sets the pinned status. - Parameters:
- isTop- The pinned status.
 
 - 
                                        isTopForTagboolean isTopForTag() Retrieves the pinned status of the current conversation under this tag. This field is only valid when retrieving conversations by tag using {#getConversationsFromTagByPage}. - Returns:
- The pinned status. 
- Since:
- 5.6.4 
 
 - 
                                        setTopForTagvoid setTopForTag(boolean isTopForTag) Sets the pinned status of the current conversation under this tag. - Parameters:
- isTopForTag- The pinned status.
- Since:
- 5.6.4 
 
 - 
                                        getOperationTimelong getOperationTime() Gets the operation timestamp (Unix timestamp in milliseconds) for this conversation, used as the timestamp parameter when paginating through the conversation list. The initial value is the same as sentTime. Operations such as pinning will update this timestamp. - Returns:
- The operation timestamp 
- Since:
- 5.6.8 
 
 - 
                                        setOperationTimevoid setOperationTime(long operationTime) Sets the operation time for this conversation (Unix timestamp in milliseconds). - Parameters:
- operationTime- The operation time
- Since:
- 5.6.8 
 
 - 
                                        getSenderUserNameString getSenderUserName() Retrieves the name of the user who sent the message. - Returns:
- The name of the user who sent the message. 
 
 - 
                                        setSenderUserNamevoid setSenderUserName(String senderUserName) Sets the username of the message sender. - Parameters:
- senderUserName- The username of the message sender.
 
 - 
                                        getDraftString getDraft() Retrieves the draft present in the conversation. - Returns:
- The draft present in the conversation. 
 
 - 
                                        setDraftvoid setDraft(String draft) Sets the draft in the conversation. - Parameters:
- draft- The draft in the conversation.
 
 - 
                                        getNotificationStatusConversation.ConversationNotificationStatus getNotificationStatus() Retrieves the message notification status. - Returns:
- The message notification status. 
 
 - 
                                        setNotificationStatusvoid setNotificationStatus(Conversation.ConversationNotificationStatus notificationStatus) Sets the status for retrieving notification messages. - Parameters:
- notificationStatus- The status of the message.
 
 - 
                                        getMentionedCount@Deprecated() int getMentionedCount() Retrieves the count of unread messages in this conversation where you were mentioned. - Returns:
- The count of unread mentions 
 
 - 
                                        setMentionedCountvoid setMentionedCount(int count) Sets the count of unread @ messages in this conversation. - Parameters:
- count- The number of unread @ messages.
 
 - 
                                        getPushNotificationLevelint getPushNotificationLevel() Get the Do Not Disturb notification level - Returns:
- The Do Not Disturb notification level 
 
 - 
                                        setPushNotificationLevelvoid setPushNotificationLevel(int pushNotificationLevel) Sets the Do Not Disturb notification level - Parameters:
- pushNotificationLevel- The Do Not Disturb notification level
 
 - 
                                        getChannelTypeIRongCoreEnum.UltraGroupChannelType getChannelType() Retrieves the channel type of the ultra group conversation. - Returns:
- The channel type. 
- Since:
- 5.2.4 
 
 - 
                                        setChannelTypevoid setChannelType(IRongCoreEnum.UltraGroupChannelType channelType) Sets the channel type for the ultra group conversation - Parameters:
- channelType- The channel type
- Since:
- 5.2.4 
 
 - 
                                        getFirstUnreadMsgSendTimelong getFirstUnreadMsgSendTime() Gets the timestamp of the first unread message in the conversation (Unix timestamp in milliseconds). - Returns:
- The timestamp of the first unread message. 
- Since:
- 5.2.5 
 
 - 
                                        setFirstUnreadMsgSendTimevoid setFirstUnreadMsgSendTime(long firstUnreadMsgSendTime) Sets the timestamp of the first unread message in the conversation (Unix timestamp, in milliseconds). - Parameters:
- firstUnreadMsgSendTime- The timestamp of the first unread message
- Since:
- 5.2.5 
 
 - 
                                        obtainstatic Conversation obtain(Conversation.ConversationType type, String id, String title) Constructor. - Parameters:
- type- Specifies the conversation type.
- id- Represents the conversation ID.
- title- Indicates the conversation title.
 
 - 
                                        writeToParcelvoid writeToParcel(Parcel dest, int flags) 
 - 
                                        describeContentsint describeContents() 
 - 
                                        getReceivedStatusReceivedStatus getReceivedStatus() Retrieves the receipt status of the last message in the conversation. - Returns:
- The receipt status of the last message in the conversation. 
 
 - 
                                        setReceivedStatusvoid setReceivedStatus(ReceivedStatus receivedStatus) Sets the received status of the last message in the conversation. - Parameters:
- receivedStatus- Indicates the received status of the last message in the conversation.
 
 - 
                                        getSentStatusSentStatus getSentStatus() Retrieves the send status of the last message in the conversation. - Returns:
- The send status of the last message in the conversation. 
 
 - 
                                        setSentStatusvoid setSentStatus(SentStatus sentStatus) Sets the sending status of the last message in the conversation. - Parameters:
- sentStatus- The sending status of the last message in the conversation.
 
 - 
                                        getReceivedTimelong getReceivedTime() Retrieves the receive time of the last message in the conversation (Unix timestamp in milliseconds). The receive time is the local time of the client when the message arrives at the receiving client. - Returns:
- The receive time of the last message in the conversation (Unix timestamp in milliseconds). 
 
 - 
                                        setReceivedTimevoid setReceivedTime(long receivedTime) Sets the received time of the last message in the conversation (Unix timestamp in milliseconds). - Parameters:
- receivedTime- The received time of the last message in the conversation (Unix timestamp in milliseconds).
 
 - 
                                        getSentTimelong getSentTime() Get the sending time of the last message in the conversation (Unix timestamp, milliseconds) The sending time is the server time when the message arrives at the server from the sending client. - Returns:
- The sending time of the last message in the conversation (Unix timestamp, milliseconds) 
 
 - 
                                        setSentTimevoid setSentTime(long sentTime) Sets the sent time of the last message in the conversation (Unix timestamp in milliseconds). The sent time is the server time when the message arrives at the server from the sending client. - Parameters:
- sentTime- The sent time of the last message in the conversation (Unix timestamp in milliseconds)
 
 - 
                                        getObjectNameString getObjectName() Gets the name of the message object. The name of the message object is the value specified in the annotation. - Returns:
- The name of the message object. 
 
 - 
                                        setObjectNamevoid setObjectName(String objectName) Sets the name of the message object. The name of the message object corresponds to the value in the annotation. - Parameters:
- objectName- The name of the message object.
 
 - 
                                        getSenderUserIdString getSenderUserId() Retrieves the user ID of the message sender. - Returns:
- The user ID of the message sender. 
 
 - 
                                        setSenderUserIdvoid setSenderUserId(String senderUserId) Sets the user ID of the message sender. - Parameters:
- senderUserId- The user ID of the message sender.
 
 - 
                                        getLatestMessageIdint getLatestMessageId() Retrieves the ID of the last message in this conversation. (Unique database index value) - Returns:
- The ID of the last message in this conversation. 
 
 - 
                                        setLatestMessageIdvoid setLatestMessageId(int latestMessageId) Sets the ID of the last message in this conversation. (Unique value for database indexing) - Parameters:
- latestMessageId- The ID of the last message in this conversation.
 
 - 
                                        getLatestMessageMessageContent getLatestMessage() Retrieves the content of the last message in the conversation. - Returns:
- The content of the last message in the conversation. 
 
 - 
                                        setLatestMessagevoid setLatestMessage(MessageContent latestMessageContent) Sets the content of the last message in the conversation. - Parameters:
- latestMessageContent- The content of the last message in the conversation.
 
 - 
                                        getUnreadMentionedCountint getUnreadMentionedCount() Get the count of unread @ mentions in this conversation. /** - Returns:
- The number of unread @ mentions 
 
 - 
                                        getUnreadMentionedMeCountint getUnreadMentionedMeCount() Retrieves the count of unread messages in this conversation where only you are mentioned. - Returns:
- The number of unread mentions 
 
 - 
                                        getLatestMessageDirectionMessageDirection getLatestMessageDirection() Retrieves the message direction. - Returns:
- The message direction. 
 
 - 
                                        setLatestMessageDirectionvoid setLatestMessageDirection(MessageDirection latestMessageDirection) Sets the message direction. - Parameters:
- latestMessageDirection- Specifies the message direction.
 
 - 
                                        getLatestMessageExtraString getLatestMessageExtra() Retrieve the additional information of the message. - Returns:
- Specifies the additional information of the message. 
 
 - 
                                        setLatestMessageExtravoid setLatestMessageExtra(String latestMessageExtra) Sets the additional information for the message. - Parameters:
- latestMessageExtra- The additional information for the message.
 
 - 
                                        getLatestMessageUIdString getLatestMessageUId() Retrieves the unique message ID from the server (globally unique within the same AppKey). - Returns:
- uid The unique message ID from the server (globally unique within the same AppKey) 
 
 - 
                                        setLatestMessageUIdvoid setLatestMessageUId(String latestMessageUId) Sets the server message unique ID (globally unique within the same AppKey). - Parameters:
- latestMessageUId- The server message unique ID (globally unique within the same AppKey)
 
 - 
                                        getLatestMessageReadReceiptInfoReadReceiptInfo getLatestMessageReadReceiptInfo() Retrieves the read receipt status of the last message. - Returns:
- The read receipt status. 
 
 - 
                                        setLatestMessageReadReceiptInfovoid setLatestMessageReadReceiptInfo(ReadReceiptInfo latestMessageReadReceiptInfo) Sets the read receipt status of the last message - Parameters:
- latestMessageReadReceiptInfo- The read receipt status
 
 - 
                                        getLatestMessageConfigMessageConfig getLatestMessageConfig() Retrieves the message configuration. - Returns:
- MessageConfig The message configuration. 
 
 - 
                                        setLatestMessageConfigvoid setLatestMessageConfig(MessageConfig latestMessageConfig) Set message configuration - Parameters:
- latestMessageConfig- Message configuration
 
 - 
                                        isLatestCanIncludeExpansionboolean isLatestCanIncludeExpansion() Indicates whether the message can contain extended information. This property is determined when the message is sent and cannot be modified afterwards. Extended information is only supported in one-to-one chat and group chat. Other conversation types cannot set extended information. - Returns:
- Indicates whether the message can contain extended information. 
 
 - 
                                        setLatestCanIncludeExpansionvoid setLatestCanIncludeExpansion(boolean latestCanIncludeExpansion) Sets whether the message can include extended information - Parameters:
- latestCanIncludeExpansion- Indicates whether the message can include extended information
 
 - 
                                        getLatestExpansionMap<String, String> getLatestExpansion() Retrieves the list of expansion information for the last message. - Returns:
- List of message expansion information 
 
 - 
                                        setLatestExpansionvoid setLatestExpansion(Map<String, String> latestExpansion) Sets the latest message expansion information list. - Parameters:
- latestExpansion- The list of message expansion information.
 
 - 
                                        getMessageMessage getMessage() Retrieves the latest message of the conversation - Since:
- 5.8.0 
 
 - 
                                        setMessagevoid setMessage(Message latestMessage) The LatestMessage of the conversation - Since:
- 5.8.0 
 
 - 
                                        setMentionedMeCountvoid setMentionedMeCount(int count) Sets the count of unread @ messages in this conversation that are only for the current user. - Parameters:
- count- The count of unread messages.
 
 
- 
                                        
 
- 
                                
                            
                                
 
- 
                    
                    
                    
 
-