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.
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
|Binary Data Message
|Location - Latitude
|-720 (out of range)
|Location - Longitude
|-720 (out of range)
Following are some of the protocol-level properties which describe the message ID, type, timestamp, remote peer, and group.
|Message 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 details
|Message Type, you can assign any value
|User address who sent the message
|Group ID if the message was sent to the group, zero otherwise
|Profile of the user who sent the message
|Profile of the group if the message was sent to the group, null otherwise
|Message timestamp in milliseconds (epoch)
|date object with year, month, day, hours, mins, secs, and days elapsed
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.
|Emojify the text, replace a few commonly used emoticons with emoji
|Mark it as matured content
|When forwarding messages(s), mark them as forwarded
|File Transfer Properties
|Copy files to the mesibo folder before sending. By default, mesibo does not copy to optimize the disk space and performance
|Send the name of the file. We provided this option for a financial institute customer wanting an option to protect file name
|Automatically generate a thumbnail from the file and send it with the message
|Mesibo 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 space
|Send 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 needs
|Mesibo tries to maintain thumbnail orientation to be the same as images. This option overrides the default orientation
|same as horizontalThumbnail but for vertical orientation
|Resize media and generate thumbnail (if not set) as required
|Maximum width or height of the thumbnail
|Thumbnail aspect ratio for horizontal images. It is reversed for vertical images
|Mesibo compresses images for faster transfer and performance if the size is more than passthroughSize. You need to use file hosting to use this feature
|Use auth token for authentication when downloading the file. Refer to the File Transfer section for more details
|iOS Only - PHAsset Object
|iOS Only - File Local Identifier
|URL and URL Preview Properties
|Extract URL from the message
|Generate preview from the extracted or from the URL set using
|If the URL points to an image file, save it locally and extract the thumbnail (if applicable)
sameImageUrl described above but for video file
sameImageUrl described above but for audio file
sameImageUrl described above but for all types of file
|save file only if the size is less than urlTransferSize
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;