V2TimMessage

Introduction

The messages.

Parameter introduction

msgID

  • Parameter type : String

  • Supported Platform: All

  • Parameter description : It is empty when a message is created and is returned synchronously when sendMessage is called.

timestamp

  • Parameter type : int

  • Supported Platform: All

  • Parameter description : The time a message is sent to the server, which can be used for message sorting.

progress

  • Parameter type : int

  • Supported Platform: All

  • Parameter description : The uploading progress for media and file messages, from 0 to 100.

sender

  • Parameter type : String

  • Supported Platform: All

  • Parameter description : userID of the message sender. It can be set by users and must be the same as the userID passed in during login.

nickName

  • Parameter type : String

  • Supported Platform: All

  • Parameter description : Nickname of the message sender. It can be set by users and modified by calling setSelfInfo. For more information, see User Profile.

friendRemark

  • Parameter type : String

  • Supported Platform: All

  • Parameter description : Remarks of the message sender's friend. It is used by the receiver. For example, if Alice sets Bob's remarks to bob01, when Bob sends a message to Alice, Alice will see that friendRemark in the message is bob01. It can be set by calling setFriendInfo.

faceUrl

  • Parameter type : String

  • Supported Platform: All

  • Parameter description : Profile photo of the message sender. It can be set by users and can be used to download the photo.

nameCard

  • Parameter type : String

  • Supported Platform: All

  • Parameter description : Group name card of the sender. It applies only to group messages. For example, if Alice changes her group name card to doctorA and sends a message to the group, other group members will receive the message where the nameCard field is doctorA. The receiver can prioritize this field as the username for display. This field can be set by calling setGroupMemberInfo.

groupID

  • Parameter type : String

  • Supported Platform: All

  • Parameter description : groupID is the group ID in a group message or null in a one-to-one message.

userID

  • Parameter type : String

  • Supported Platform: All

  • Parameter description : userID is the ID of the receiver in a one-to-one message or null in a group message.

status

  • Parameter type : int

  • Supported Platform: All

  • Parameter description : Message sending status.

Currently, the following statuses are supported:

1: Message sending.

2: Message sent successfully.

3: Message failed to send.

4: Message been deleted.

5: Message been imported locally.

6: Message been recalled.

elemType

  • Parameter type : int

  • Supported Platform: All

  • Parameter description : Message type.

Currently, the following message types are supported:

1: Text message.

2: Custom message.

3: Image message.

4: Sound voice message.

5: Video message.

6: File message.

7: Location message.

8: Sticker message.

9: Group tips message.

10: Merger message.

textElem

  • Parameter type : V2TimTextElem

  • Supported Platform: All

  • Parameter description : Text message storage element. It needs to be created and entered when a text message is sent. When the message is received and elemType is identified as TEXT, the content can be parsed from textElem.

customElem

  • Parameter type : V2TimCustomElem

  • Supported Platform: All

  • Parameter description : Custom message storage element. It needs to be created and entered when a custom message is sent. When the message is received and elemType is identified as CUSTOM, the content can be parsed from customElem.

imageElem

  • Parameter type : V2TimImageElem

  • Supported Platform: All

  • Parameter description : Image message storage element. It needs to be created and entered when an image message is sent. When the message is received and elemType is identified as IMAGE, the content can be parsed from imageElem.

soundElem

  • Parameter type : V2TimSoundElem

  • Supported Platform: All

  • Parameter description : Audio message storage element. It needs to be created and entered when an audio message is sent. When the message is received and elemType is identified as SOUND, the content can be parsed from soundElem.

videoElem

  • Parameter type : V2TimVideoElem

  • Supported Platform: All

  • Parameter description : Video message storage element. It needs to be created and entered when a video message is sent. When the message is received and elemType is identified as VIDEO, the content can be parsed from videoElem.

fileElem

  • Parameter type : V2TimFileElem

  • Supported Platform: All

  • Parameter description : File message storage element. It needs to be created and entered when a file message is sent. When the message is received and elemType is identified as FILE, the content can be parsed from fileElem.

locationElem

  • Parameter type : V2TimLocationElem

  • Supported Platform: All

  • Parameter description : Geographical location message storage element. It needs to be created and entered when a geographical location message is sent. When the message is received and elemType is identified as LOCATION, the content can be parsed from locationElem.

faceElem

  • Parameter type : V2TimFaceElem

  • Supported Platform: All

  • Parameter description : Sticker message storage element. It needs to be created and entered when an sticker message is created. When the message is received and elemType is identified as FACE, the content can be parsed from faceElem.

groupTipsElem

  • Parameter type : V2TimGroupTipsElem

  • Supported Platform: All

  • Parameter description : Group tip message storage element. Currently, a group tip message can be sent only by the server. When the message is received by the SDK and elemType is identified as GROUP_TIPS, the content can be parsed from groupTipsElem. For more information, see OnRecvNewMessageCallback property.

mergerElem

  • Parameter type : V2TimMergerElem

  • Supported Platform: All

  • Parameter description : Merged message storage element. It needs to be created and entered when a merged message is sent. When the message is received and elemType is identified as MERGER, the content can be parsed from mergerElem.

localCustomData

  • Parameter type : String

  • Supported Platform: All

  • Parameter description : Custom message data. It is set by the sender. It is saved locally, will not be sent to the receiver, and will become invalid after the application is uninstalled and reinstalled.

localCustomInt

  • Parameter type : int

  • Supported Platform: All

  • Parameter description : Custom message data. It is set by the sender. It is saved locally, will not be sent to the receiver, and will become invalid after the application is uninstalled and reinstalled. It can be used to mark whether an audio or video message has been played back.

cloudCustomData

  • Parameter type : String

  • Supported Platform: All

  • Parameter description : Custom message data. It is set by the sender and can be customized. It is saved in the cloud, will be sent to the receiver, and can still be loaded after the application is uninstalled and reinstalled.

isSelf

  • Parameter type : bool

  • Supported Platform: All

  • Parameter description : Whether the message is sent by self.

isRead

  • Parameter type : bool

  • Supported Platform: All

  • Parameter description : Whether the message is read at the local end.

isPeerRead

  • Parameter type : bool

  • Supported Platform: All

  • Parameter description : Whether the message is read by the receiver. It applies only to one-to-one messages.

priority

  • Parameter type : int

  • Supported Platform: All

  • Parameter description : Message priority. It applies only to group messages and can be set by calling the sendMessage method.

offlinePushInfo

  • Parameter type : V2TimOfflinePushInfo

  • Supported Platform: All

  • Parameter description : Custom offline push configuration.

groupAtUserList

  • Parameter type : List< String >

  • Supported Platform: All

  • Parameter description : List of users mentioned in the group message.

seq

  • Parameter type : String

  • Supported Platform: All

  • Parameter description : Message serial number. The seq values of one-to-one messages are locally generated and may not be in ascending order and unique; the seq values of group messages are generated by the server and are in ascending order and unique in the group.

random

  • Parameter type : int

  • Supported Platform: All

  • Parameter description : Random message code.

isExcludedFromUnreadCount

  • Parameter type : bool

  • Supported Platform: All

  • Parameter description : Whether the message is excluded from the unread message count of the conversation. It is set by the sender. By default, messages are included in the unread message count.

isExcludedFromLastMessage

  • Parameter type : bool

  • Supported Platform: All

  • Parameter description : Whether the message is excluded from the lastMsg of the conversation. It is set by the sender. By default, messages are included in the lastMsg of the conversation.

messageFromWeb

  • Parameter type : String

  • Supported Platform: All

  • Parameter description : The message instance using on Web.

id

  • Parameter type : String

  • Supported Platform: All

  • Parameter description : The ID of the message created.

needReadReceipt

  • Parameter type : bool

  • Supported Platform: All

  • Parameter description : Whether the message requires a read receipt. It is set by the sender and valid for the Ultimate edition.

toJson

  • Parameter type : Map< String, dynamic > toJson()

  • Supported Platform: All

  • Parameter description : Get the data in Map.

results matching ""

    No results matching ""