BlackBerry Spark Communications Services for iOS  1.9.0
BBMChatMessageSendMessage Class Reference
Inheritance diagram for BBMChatMessageSendMessage:
BBMJSONMessage

Instance Methods

(id) - initWithChatId:tag:
 
- Instance Methods inherited from BBMJSONMessage
(NSString *) - requestData
 
(NSDictionary *) - requestDict
 

Properties

NSString * chatId
 
NSString * tag
 
NSString * content
 
BBMChatMessageSendMessage_Datadata
 
NSDictionary * rawData
 
NSString * file
 
BBMChatMessageSendMessageFilePolicy filePolicy
 
BOOL isControl
 
BOOL neverCountUnread
 
NSArray * ref
 
NSString * thumb
 
BBMChatMessageSendMessageThumbPolicy thumbPolicy
 

Detailed Description

Represents the chatMessageSend protocol message.

Send a new message within an existing chat. This will result in a 'listAdd' on the 'listChatMessage' list, and the message will be sent to the BlackBerry Infrastructure and forwarded to the other endpoints that are participating in the chat.

Sending a new message within a 1:1 chat before the invited party has joined can trigger the invitation to be reissued when other conditions are also met. This mechanism achieves a partially automatic user-speed retry of 1:1 chat invitations. There is no automatic mechanism for non-1:1 chats, but invitations for all types of chats can be reissued upon request via 'chatInvite'.

Since
R2

Property Documentation

◆ chatId

- (NSString*) chatId
readnonatomicstrong

The identifier of the chat in which to send the message.

Since
R2

◆ content

- (NSString*) content
readwritenonatomicstrong

Holds the text content of the message, when the 'tag' has such a concept; otherwise omitted.The total size of the 'content' in UTF-8 is subject to a cumulative size limit when combined with the size of the 'data' object (encoded as JSON in UTF-8) and the size of the 'thumb' attachment. These three fields combined must not exceed 71680 bytes (70 KB).

Since
R2

◆ data

- (BBMChatMessageSendMessage_Data*) data
readwritenonatomicstrong

This field contains opaque data managed by your application that is sent with the message. Unless specifically noted, bbmcore does not examine or modify this JSON object.This can contain a single JSON object, or it can not exist at all. It cannot contain any other JSON type.Many 'tag' values have a corresponding object defined as a child of the 'data' object with a key equal to the 'tag'. All 'tags' with such a corresponding child of 'data' require that child to be present. Other tags have no such requirement.The 'data' object can also contain other key-value pairs independently from the 'tag'.The total size of the 'data' object (encoded as JSON in UTF-8) is subject to a cumulative size limit when combined with the size of the 'thumb' attachment and the 'content' (also in UTF-8). These three fields combined must not exceed 71680 bytes (70 KB).

Since
R2

◆ file

- (NSString*) file
readwritenonatomicstrong

A path to a large file that is not carried in the message. This file is uploaded by bbmcore automatically.A maximum file size limit of 128 MB is imposed by bbmcore. If your application attempts to attach a file that exceeds this limit, the 'message' will be added to the chat in the 'Failed' state. The size limit may change in future versions. Receiving clients that encounter files that are larger than their maximums will not download them.Attachments from R5 or later endpoints preserve a locally-cleaned version of any suggested attachment filename that the sender provided by including it as the leaf filename of this path. Attachments that did not have a suggested filename will use an implementation-defined locally-assigned sequential or random filename.

Since
R2

◆ filePolicy

- (BBMChatMessageSendMessageFilePolicy) filePolicy
readwritenonatomicassign

This enumeration tells bbmcore what to do with the file referenced by 'file'. For all other documentation, please see 'thumbPolicy'.

Since
R2

◆ isControl

- (BOOL) isControl
readwritenonatomicassign

Set the 'control' flag ('C') on the 'chatMessage'. See the 'chatMessage' 'flags' field for details.

Since
R9

◆ neverCountUnread

- (BOOL) neverCountUnread
readwritenonatomicassign

Set the 'neverCountUnread' flag ('N') on the 'chatMessage'. See the 'chatMessage' 'flags' field for details.

Since
R9

◆ rawData

- (NSDictionary*) rawData
readwritenonatomicstrong

This field contains a JSON data object that is not defined in BBMDS.

◆ ref

- (NSArray*) ref
readwritenonatomicstrong

A 'chatMessage' can reference other messages or be referenced by other messages.All references are directional and known to both messages involved. If message A references message B, then A has an entry in its 'ref' array with the 'messageId' of B, and B has an entry in its 'refBy' array that counts the reference from A.Each reference in the 'ref' array has an application-specified 'tag' that indicates what kind of reference it is. A single message can only have one 'ref' for each tag string. Your application uses 'tag' strings to allow multiple different kinds of references between messages. For example, a message could both 'Quote' one message and 'Edit' another.Each reference in the 'refBy' array has the same application-specified tag. A single message can have multiple references to it with the same 'tag'. To find all messages that refer to a given message, use 'requestListMatching' with the 'tag' and the 'messageId' of the referred-to message. Because the number of incoming references to a message can be large, only the most recent referring message is identified by 'newestRef' in 'refBy', along with a count of the total number of referring messages.When there are no references to any other messages, the 'ref' field is omitted.

Since
R5

◆ tag

- (NSString*) tag
readnonatomicstrong

Indicates the type of message. Your application may include any arbitrary value in the 'tag' field that is meaningful to it, with one exception: bbmcore will ignore any 'chatMessageSend' from your application that uses one of the reserved tags: 'Join', 'Leave', 'Subject', 'Gap', 'Shred', 'Clear', 'Admin', or 'Remove'. Text - The message contains plain text content. This tag requires 'content'

Since
R2

◆ thumb

- (NSString*) thumb
readwritenonatomicstrong

A path to a small file that is carried in the message.The thumb file may contain no more than 56320 bytes (55 KB).The total size of the thumb file is subject to a cumulative size limit when combined with the size of the 'data' object (encoded as JSON in UTF-8) and the size of the 'content' (in UTF-8). These three fields combined must not exceed 71680 bytes (70 KB).Attachments from R5 or later endpoints preserve a locally-cleaned version of any suggested attachment filename that the sender provided by including it as the leaf filename of this path. Attachments that did not have a suggested filename will use an implementation-defined locally-assigned sequential or random filename.

Since
R2

◆ thumbPolicy

- (BBMChatMessageSendMessageThumbPolicy) thumbPolicy
readwritenonatomicassign

This enumeration tells bbmcore what to do with the file referenced by 'thumb'. If not provided a default of Copy is used. Note that in the case of Delete and Move, bbmcore will not delete the source file if the request was invalid to the point of being indecipherable, or if bbmcore lacks permissions to delete the file (including when the source file is open and the OS doesn't permit open files to be deleted).

Since
R2