Class documentation

There are few model class which defines and strucures the enity which are used in this SDK.

RecentChat Class#

RecentChat model class was used to get recent chat info of user/group with whom we made conversation.

PropertyTypeDescription
jidStringUnique Identifier of a user
nickNameStringNickname(Name saved in your contacts) of the user
profileNameStringName of the user in server he added during registration
profileImageStringdisplay image url of the user
isGroupboolCheck whether the entity belongs to a single chat user or a group
isBroadCastboolCheck whether the entity belongs to a single chat user or a broadcast
unreadMessageCountdynamicholds the value of unread messages count for that
isChatPinnedboolChecks whether this recent chat model is a pinned to appear at top
isChatArchivedboolCheck whether the chat user/group is archived or not
lastMessageIdStringhold the id of the last message in conversation with the user/group
lastMessageStatusStringhold the status of last message
lastMessageContentStringif the last message is text or image with caption then the text or caption will be available in this property
lastMessageTimedynamictime in microseconds of the last last message in conversation with the user/group
lastMessageTypeStringholds the value of message type of the last message in conversation with the user/group
isLastMessageSentByMeboolChecks whether the last message in conversation is sent by me
isLastMessageRecalledByUserboolChecks whether the last message in conversation was recalled(deleted) by the user(contact)
isMutedboolChecks whether we muted the user/group
isBlockedboolsays whether we blocked this user or not
isBlockedMeboolsays whether the user(contact) blocked us or not
isAdminBlockedboolsays whether the user/group blocked by Admin or not
isConversationUnReadboolcheks whether the conversation has unread messages or not
isItSavedContactboolChecks whether this this user is saved in our phone contact book or not
contactTypeStringHolds the value of contact type
isGroupInOfflineModeboolChecks whether the group was created in server or not
topicIDStringTopic ID to be sent
If not made a conversation with a user then null object will be

returned for that user if queried.

Profile Class#

Profile model class was used to get info of a user/group.

PropertyTypeDescription
jidStringUnique Identifier of a user
nameStringName of the user
imageStringdisplay image url of the user
mobileNumberStringmobile number of the user
nickNameStringNickname(Name saved in your contacts) of the user
statusStringStatus of the user
emailStringEmail of the user
isMutedboolChecks whether we muted the user/group
isBlockedboolsays whether we blocked this user or not
isBlockedMeboolsays whether the user(contact) blocked us or not
isAdminBlockedboolsays whether the user/group blocked by Admin or not
isItSavedContactboolChecks whether this this user is saved in our phone contact book or not
isGroupProfileboolChecks whether this is a group profile or not
isGroupInOfflineModeboolChecks whether the group was created in server or not
contactTypeStringHolds the value of contact type

ProfileStatus Class#

ProfileStatus model class was used to get/update the status of the user.

PropertytypeDescription
idStringUnique Identifierfor the status
statusStringHolds the value of the status
isCurrentStatusboolchecks whether the status object is the currently selected one

ContactTypes Definition#

ContactType was used to denote the type of the contact.

PropertyTypeDescription
LIVE_CONTACTStringContact saved in our phone contact book and a registered user
LOCAL_CONTACTStringContact saved in our phone contact book and a non registered user
UNKNOWN_CONTACTStringContact not saved in our phone contact book and a registered user
DELETED_CONTACTStringContact 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.

PropertyTypeDescription
idStringUnique Identifierfor the busy status
statusStringHolds the value of the busy status
isCurrentStatusboolchecks whether the busy status object is the currently selected one

MessageStatus Definition#

MessageStatus was used to denote the status of a message.

PropertyTypeDescription
SENTStringmessage not yet received by the chat server
ACKNOWLEDGEDStringmessage received by the chat server
DELIVEREDStringmessage was delivered to the receiver
SEENStringthe receiver user saw the message

ChatMessage Class#

ChatMessage model class was used to define a message structure.

PropertyTypeDescription
messageIdStringUnique Id of a ChatMessage
messageTextContentStringText content of the message if it was available
messageSentTimedynamicPosted time of the message
senderUserNameStringName of the user in server he added during registration
senderNickNameStringName of the Chat user in your phone book if contact sync is enabled
senderUserJidStringJid of the sender if it is a group
chatUserJidStringJid of the chat user/group
messageTypeStringType of the message
messageChatTypeStringType of chat that the message belongs to
messageStatusStringStatus of the message
isMessageSentByMebooltrue if message was sent by you
isItCarbonMessagebooltrue if the message is sent by you from another resource like web/pc
isMessageStarredbooltrue if you starred/favourite the message
isMessageDeletedbooltrue if the message was deleted locally
isMessageRecalledbooltrue if the message was deleted by the sender
messageCustomFieldMap<String,dynamic>custom value will be available here if added
contactChatMessageContactChatMessagethe receiver user saw the message
locationChatMessageLocationChatMessageHolds the location data if this is a location message
mediaChatMessageMediaChatMessageHolds the media details if this is a media message
contactChatMessageContactChatMessagethe receiver user saw the message
isThisAReplyMessagebooltrue if this is a reply to another message
replyParentChatMessageReplyParentChatMessageHold the necessary data of the original parent message to which this message is a reply
topicIDStringTopic ID to be sent

ReplyParentChatMessage Class#

ReplyParentChatMessage model class was used to provide necessary data for parent message to which a message was a reply.

PropertyTypeDescription
messageIdStringId of the message
messageTypeStringType of the message
chatUserJidStringJid of the message sender user
messageSentTimedynamicPosted time of the message
isMessageSentByMebooltrue if message was sent by you
senderUserNameStringName of the user in server he added during registration
senderNickNameStringName of the Chat user in your phone book if contact sync is enabled
isMessageStarredbooltrue if you starred/favourite the message
isMessageDeletedbooltrue if the message was deleted locally
isMessageRecalledbooltrue if the message was deleted by the sender
messageTextContentStringText content of the message if it was available
contactChatMessageContactChatMessagethe receiver user saw the message
locationChatMessageLocationChatMessageHolds the location data if this is a location message
mediaChatMessageMediaChatMessageHolds the media details if this is a media message

ContactChatMessage Class#

ContactChatMessage model class defines the structure of a Contact message.

PropertyTypeDescription
messageIdStringId of the message
contactNameStringName of the contact f
contactPhoneNumbersList<String>List of phone numbers available for the contact
isChatAppUserList<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.

PropertyTypeDescription
messageIdStringId of the message
latitudedoubleLatitude of the location
longitudedoubleLongitude of the location
mapLocationUrlStringUrl to go to a map for the location

MediaChatMessage Class#

MediaChatMessage model class defines the structure of a Media message.

PropertyTypeDescription
messageIdStringId of the message
mediaFileNameStringame of the media file
mediaDurationintDuration of the media file if its a audio/video
messageTypeStringType of the message
mediaFileSizeintSize of the media file
mediaFileTypeStringType of the file
mediaUploadStatusintUpload status of the media file
mediaDownloadStatusintDownload status of the media file
mediaLocalStoragePathStringLocal path in which the media file resides if its available
mediaThumbImageStringBase64 thumbnail image string if it is a video/image
mediaCaptionTextStringHolds the caption if one provided
mediaProgressStatusintProgress of the upload/download media file