Class documentation
There are few model class which defines and strucures the enity which are used in this SDK.
RecentChatData Class#
RecentChat model class was used to get recent chat info of user/group with whom we made conversation.
| Property | Type | Description |
|---|---|---|
| jid | String | Unique Identifier of a user |
| nickName | String | Nickname(Name saved in your contacts) of the user |
| profileName | String | Name of the user in server he added during registration |
| profileImage | String | display image url of the user |
| isGroup | bool | Check whether the entity belongs to a single chat user or a group |
| isBroadCast | bool | Check whether the entity belongs to a single chat user or a broadcast |
| unreadMessageCount | int | holds the value of unread messages count for that |
| isChatPinned | bool | Checks whether this recent chat model is a pinned to appear at top |
| isChatArchived | bool | Check whether the chat user/group is archived or not |
| lastMessageId | String | hold the id of the last message in conversation with the user/group |
| lastMessageStatus | String | hold the status of last message |
| lastMessageContent | String | if the last message is text or image with caption then the text or caption will be available in this property |
| lastMessageTime | int | time in microseconds of the last last message in conversation with the user/group. (DateTime.fromMicrosecondsSinceEpoch(lastMessageTime.toInt())) |
| lastMessageType | String | holds the value of message type of the last message in conversation with the user/group |
| isLastMessageSentByMe | bool | Checks whether the last message in conversation is sent by me |
| isLastMessageRecalledByUser | bool | Checks whether the last message in conversation was recalled(deleted) by the user(contact) |
| isMuted | bool | Checks whether we muted the user/group |
| isBlocked | bool | says whether we blocked this user or not |
| isBlockedMe | bool | says whether the user(contact) blocked us or not |
| isAdminBlocked | bool | says whether the user/group blocked by Admin or not |
| isConversationUnRead | bool | cheks whether the conversation has unread messages or not |
| isItSavedContact | bool | Checks whether this this user is saved in our phone contact book or not |
| contactType | String | Holds the value of contact type |
| isGroupInOfflineMode | bool | Checks whether the group was created in server or not |
| metaData | List<MessageMetaData> | Hold the metaData list of the recent chat. |
| topicID | String | Topic ID to be sent |
If not made a conversation with a user then null object will be
returned for that user if queried.
ProfileDetail Class#
ProfileDetail model class was used to get info of a user/group.
| Property | Type | Description |
|---|---|---|
| jid | String | Unique Identifier of a user |
| name | String | Name of the user |
| image | String | display image url of the user |
| mobileNumber | String | mobile number of the user |
| nickName | String | Nickname(Name saved in your contacts) of the user |
| status | String | Status of the user |
String | Email of the user | |
| isMuted | bool | Checks whether we muted the user/group |
| isBlocked | bool | says whether we blocked this user or not |
| isBlockedMe | bool | says whether the user(contact) blocked us or not |
| isAdminBlocked | bool | says whether the user/group blocked by Admin or not |
| isItSavedContact | bool | Checks whether this this user is saved in our phone contact book or not |
| isGroupProfile | bool | Checks whether this is a group profile or not |
| isGroupInOfflineMode | bool | Checks whether the group was created in server or not |
| contactType | String | Holds the value of contact type |
Profile Class#
Profile model class was used to update the profile of a user.
| Property | Type | Description |
|---|---|---|
| jid | String | Unique Identifier of a user |
| name | String | Name of the user |
| image | String | display image url of the user |
| thumbImage | String | display thumbImage url of the user |
| mobileNumber | String | mobile number of the user |
| status | String | Status of the user |
String | Email of the user |
ProfileStatus Class#
ProfileStatus model class was used to get/update the status of the user.
| Property | type | Description |
|---|---|---|
| id | String | Unique Identifierfor the status |
| status | String | Holds the value of the status |
| isCurrentStatus | bool | checks whether the status object is the currently selected one |
ContactTypes Definition#
ContactType was used to denote the type of the contact.
| Property | Type | Description |
|---|---|---|
| LIVE_CONTACT | String | Contact saved in our phone contact book and a registered user |
| LOCAL_CONTACT | String | Contact saved in our phone contact book and a non registered user |
| UNKNOWN_CONTACT | String | Contact not saved in our phone contact book and a registered user |
| DELETED_CONTACT | String | Contact was a registered user and the user account was deleted |
BusyStatus Class#
BusyStatus model class was used to get/update the busy status of the user.
| Property | Type | Description |
|---|---|---|
| id | String | Unique Identifier for the busy status |
| status | String | Holds the value of the busy status |
| isCurrentStatus | bool | checks whether the busy status object is the currently selected one |
MessageStatus Definition#
MessageStatus was used to denote the status of a message.
| Property | Type | Description |
|---|---|---|
| SENT | String | message not yet received by the chat server |
| ACKNOWLEDGED | String | message received by the chat server |
| DELIVERED | String | message was delivered to the receiver |
| SEEN | String | the receiver user saw the message |
ChatMessage Class#
ChatMessage model class was used to define a message structure.
| Property | Type | Description |
|---|---|---|
| messageId | String | Unique Id of a ChatMessage |
| messageTextContent | String | Text content of the message if it was available |
| messageSentTime | int | Posted time of the message. (DateTime.fromMicrosecondsSinceEpoch(messageSentTime.toInt())) |
| senderUserName | String | Name of the user in server he added during registration |
| senderNickName | String | Name of the Chat user in your phone book if contact sync is enabled |
| senderUserJid | String | Jid of the sender if it is a group |
| chatUserJid | String | Jid of the chat user/group |
| messageType | String | Type of the message |
| messageChatType | String | Type of chat that the message belongs to |
| messageStatus | String | Status of the message |
| isMessageSentByMe | bool | true if message was sent by you |
| isItCarbonMessage | bool | true if the message is sent by you from another resource like web/pc |
| isMessageStarred | bool | true if you starred/favourite the message |
| isMessageDeleted | bool | true if the message was deleted locally |
| isMessageRecalled | bool | true if the message was deleted by the sender |
| messageCustomField | Map<String,dynamic> | custom value will be available here if added |
| contactChatMessage | ContactChatMessage | the receiver user saw the message |
| locationChatMessage | LocationChatMessage | Holds the location data if this is a location message |
| mediaChatMessage | MediaChatMessage | Holds the media details if this is a media message |
| contactChatMessage | ContactChatMessage | the receiver user saw the message |
| isThisAReplyMessage | bool | true if this is a reply to another message |
| replyParentChatMessage | ReplyParentChatMessage | Hold the necessary data of the original parent message to which this message is a reply |
| metaData | List<MessageMetaData> | Hold the metaData list of the message. |
| topicID | String | Topic ID to be sent |
| isEdited | bool | true if the message was edited |
ReplyParentChatMessage Class#
ReplyParentChatMessage model class was used to provide necessary data for parent message to which a message was a reply.
| Property | Type | Description |
|---|---|---|
| messageId | String | Id of the message |
| messageType | String | Type of the message |
| chatUserJid | String | Jid of the message sender user |
| messageSentTime | int | Posted time of the message. (DateTime.fromMicrosecondsSinceEpoch(messageSentTime.toInt())) |
| isMessageSentByMe | bool | true if message was sent by you |
| senderUserName | String | Name of the user in server he added during registration |
| senderNickName | String | Name of the Chat user in your phone book if contact sync is enabled |
| isMessageStarred | bool | true if you starred/favourite the message |
| isMessageDeleted | bool | true if the message was deleted locally |
| isMessageRecalled | bool | true if the message was deleted by the sender |
| messageTextContent | String | Text content of the message if it was available |
| contactChatMessage | ContactChatMessage | the receiver user saw the message |
| locationChatMessage | LocationChatMessage | Holds the location data if this is a location message |
| mediaChatMessage | MediaChatMessage | Holds the media details if this is a media message |
ContactChatMessage Class#
ContactChatMessage model class defines the structure of a Contact message.
| Property | Type | Description |
|---|---|---|
| messageId | String | Id of the message |
| contactName | String | Name of the contact |
| contactPhoneNumbers | List<String> | List of phone numbers available for the contact |
| isChatAppUser | List<bool> | List of boolean values to show whether the phone number in the same index of contactPhoneNumbers is a chatUser or not |
LocationChatMessage Class#
LocationChatMessage model class defines the structure of a Location message.
| Property | Type | Description |
|---|---|---|
| messageId | String | Id of the message |
| latitude | double | Latitude of the location |
| longitude | double | Longitude of the location |
| mapLocationUrl | String | Url to go to a map for the location |
MediaChatMessage Class#
MediaChatMessage model class defines the structure of a Media message.
| Property | Type | Description |
|---|---|---|
| messageId | String | Id of the message |
| mediaFileName | String | ame of the media file |
| mediaDuration | int | Duration of the media file if its a audio/video |
| messageType | String | Type of the message |
| mediaFileSize | int | Size of the media file |
| mediaFileType | String | Type of the file |
| mediaUploadStatus | int | Upload status of the media file |
| mediaDownloadStatus | int | Download status of the media file |
| mediaLocalStoragePath | String | Local path in which the media file resides if its available |
| mediaThumbImage | String | Base64 thumbnail image string if it is a video/image |
| mediaCaptionText | String | Holds the caption if one provided |
| mediaProgressStatus | int | Progress of the upload/download media file |
MessageParams Class#
MessageParams object allows several types of parameters that you can configure to customize messages as mentioned below.
| Property | Type | Description |
|---|---|---|
| toJid | String | jid of the end user/group |
| replyMessageId | String | if it is a reply message for message A, then message A's messageId |
| topicID | String | Topic ID to be sent |
| mentionedUsersIds | List<String> | list of userId to mention specific users while sending a group message |
| metaData | List<MessageMetaData> | metaData is an optional parameter to provide MetaData of Message. Maximum size is 3 and values should be string |
| textMessageParams | TextMessageParams | Object hold the parameters of the text message |
| locationMessageParams | LocationMessageParams | Object hold the parameters of the location message |
| contactMessageParams | ContactMessageParams | Object hold the parameters of the contact message |
| fileMessageParams | FileMessageParams | Object hold the parameters of the file message |
| meetMessageParams | MeetMessageParams | Object hold the parameters of the meet message |
| messageSecurityMode | MessageSecurityMode | XSS attack check added as a parameter (enabled by default). |
TextMessageParams Class#
TextMessageParams object allows several types of parameters that you can configure to customize text messages as mentioned below.
| Property | Type | Description |
|---|---|---|
| messageText | String | message content to be sent |
LocationMessageParams Class#
LocationMessageParams object hold the parameters required to send the locations message.
| Property | Type | Description |
|---|---|---|
| latitude | double | Latitude of the location |
| longitude | double | Longitude of the location |
ContactMessageParams Class#
ContactMessageParams object hold the parameters required to send the contact message.
| Property | Type | Description |
|---|---|---|
| name | String | Name of the contact |
| numbers | List<String> | Contact numbers of the contact |
FileMessageParams Class#
FileMessageParams object hold the parameters required to send the file message.
| Property | Type | Description |
|---|---|---|
| file | File | File object to be uploaded |
| caption | String | Caption of the Image/Video file |
| thumbImage | String | base64 string representation of the image or video's thumbnail |
| fileSize | int | Size of the uploaded media file in bytes |
| duration | int | Duration of the uploaded media file if its an audio or video |
| fileName | String | Name of the uploaded media file |
MeetMessageParams Class#
MeetMessageParams object hold the parameters required to send the meet message.
| Property | Type | Description |
|---|---|---|
| title | String | title of the Meet |
| scheduledDateTime | int | timeStamp of scheduled Date and Time |
| link | String | room link of the Meet |
TopicMetaData Class#
TopicMetaData information used to send the topic based messages
| Property | Type | Description |
|---|---|---|
| key | String | Name of the key |
| value | String | Name of the value |
FlyResponse Class#
FlyResponse object hold the parameters used for flycallback
| Property | Type | Description |
|---|---|---|
| isSuccess | bool | callback success or failure |
| data | String | json encode string of the callback data |
| message | String | to get callback message (optional) |
| exception | FlyException | to get exception from the callback (optional) |
FlyException Class#
FlyException object hold the parameters used for flycallback exception
| Property | Type | Description |
|---|---|---|
| code | String | code of the error |
| message | String | error message |
| throwable | dynamic | exception throwable |
IdentifierMetaData Class#
metadata information required to send the Register
| Property | Type | Description |
|---|---|---|
| key | String | Name of the key |
| value | String | Name of the value |
MessageMetaData Class#
MessageMetaData information required to send in the Message
| Property | Type | Description |
|---|---|---|
| key | String | Name of the key |
| value | String | Name of the value |
MetaDataMessageList Class#
The MetaDataMessageList model class was used to retrieve the Messages that contains metadata.
| Property | Type | Description |
|---|---|---|
| key | String | Name of the key |
| value | List<String> | List of the value |
EditMessageParams Class#
EditMessageParams object hold the parameter required to Edit the Existing Message.
| Property | Type | Description |
|---|---|---|
| messageId | String | id of the message |
| editedTextContent | String | edited content to be sent |
MirrorflyNotificationAppLaunchDetails Class#
MirrorflyNotificationAppLaunchDetails object hold the parameters for get app Launched details.
| Property | Type | Description |
|---|---|---|
| type | String | launched type ("MissedCall","MediaProgress") |
| value | dynamic | value of the app launched detail based on the type |
WebLogin Class#
The WebLogin object holds the parameters of the QR code logged-in session details.
| Property | Type | Description |
|---|---|---|
| id | int | ID of the web login detail. |
| qrUniqeToken | String | The unique token (socket ID) of the logged-in web session. |
| webBrowserName | String | Browser name of the logged-in web session. |
| osName | String | OS version or name of the device used for the web session. |
| lastLoginTime | String | The last login time of the web session. |