Mesibo Messaging Properties

In this reference section, we will describe various message properties you can set for outgoing messages and also properties you can view from any incoming or outgoing messages.

Message Content Properties

Following are the actual message content properties that you can set when sending a message. In addition, you can add a file or media using setContent() function.

PropertyDescriptionDefault
dataBinary Data Messagenull
messageText Messagenull
titleMessage Titlenull
subtitleMessage Subtitlenull
footerMessage Footernull
latitudeLocation - Latitude-720 (out of range)
longitudeLocation - Longitude-720 (out of range)

Messaging Endpoint Properties

Following are some of the protocol-level properties which describe the message ID, type, timestamp, remote peer, and group.

PropertyDescriptionDefault
midMessage ID. 32-bit unique id when sending, it will be converted into global id 0xXXXXXXXX12345678 when delivering. Refer to the Message-ID section below for detailsrandomly assigned
typeMessage Type, you can assign any value0
peerUser address who sent the messagenull
groupidGroup ID if the message was sent to the group, zero otherwise0
profileProfile of the user who sent the messageprofile
groupProfileProfile of the group if the message was sent to the group, null otherwisenull
tsMessage timestamp in milliseconds (epoch)0
datedate object with year, month, day, hours, mins, secs, and days elapseddate

Message Processing Properties

You can set the following optional properties to change the default message, media, and file-handling behavior. When you create a MesiboMessage object, it is initialized with the default properties optimized for most usage. Hence, you generally don't need to set the properties described in this document.

PropertyDescriptionDefault
emojifyEmojify the text, replace a few commonly used emoticons with emojitrue
matureContentMark it as matured contenttrue
markForwardedWhen forwarding messages(s), mark them as forwardedtrue
File Transfer Properties
copyFilesCopy files to the mesibo folder before sending. By default, mesibo does not copy to optimize the disk space and performancefalse
sendFileNameSend the name of the file. We provided this option for a financial institute customer wanting an option to protect file nametrue
sendThumbnailAutomatically generate a thumbnail from the file and send it with the messagetrue
extractThumbnailMesibo API extracts a thumbnail from the incoming file if the thumbnail was not present. You can disable this option if you like the thumbnail to be not extracted or an alternate thumbnail/preview to be shown. This option was requested by one of the users in the dating spacetrue
sendHqThumbnailSend Higher thumbnail than normal - Mesibo API optimizes thumbnail size to optimize bandwidth, this OPTION can take utilize bandwidth from your mesibo account and not hence do not use it unless you have special needsfalse
horizontalThumbnailMesibo tries to maintain thumbnail orientation to be the same as images. This option overrides the default orientationfalse
verticalThumbnailsame as horizontalThumbnail but for vertical orientationfalse
imageProcessingResize media and generate thumbnail (if not set) as requiredtrue
thumbnailMaxSideMaximum width or height of the thumbnailauto
thumbnailAspectRatioThumbnail aspect ratio for horizontal images. It is reversed for vertical imagesauto
passthroughSizeMesibo compresses images for faster transfer and performance if the size is more than passthroughSize. You need to use file hosting to use this featureauto
secureDownloadUse auth token for authentication when downloading the file. Refer to the File Transfer section for more detailsfalse
assetiOS Only - PHAsset Objectnull
localIdentifieriOS Only - File Local Identifiernull
URL and URL Preview Properties
extractUrlFromMessageExtract URL from the messagetrue
urlPreviewGenerate preview from the extracted or from the URL set using setContent()true
saveImageUrlIf the URL points to an image file, save it locally and extract the thumbnail (if applicable)true
saveVideoUrlsame as sameImageUrl described above but for video filetrue
saveAudioUrlsame as sameImageUrl described above but for audio filetrue
saveAllFileUrlsame as sameImageUrl described above but for all types of filetrue
urlTransferSizesave file only if the size is less than urlTransferSizetrue

Message-ID

One of the most important message properties is Message-ID. Message-ID is automatically assigned when you create a MesiboMessage object. However, you can change it if requires. You should use a unique Message-ID for sending each message so that you can identify the message when the message status is received.

Message-ID is a 32-bit unique id. It will be converted into a 64-bit globally unique ID by the system. The ID which you have originally passed will be preserved in the lower 32-bit of the globally unique ID.

For example, if you send a message with id 0x12345678, it will be converted into global id 0xXXXXXXXX12345678 when delivering your message to the receiver. If you use zero Message-ID, the message will be delivered only if the recipient is online, it will be discarded otherwise.

You should use zero message-ID only for cases where storage is not required, for example, presence information like typing indicators, online status, etc.

You can set Message-ID by assignment.

message.mid = 0x12345;