BlackBerry Spark Communications Services for iOS  1.9.0
BBMChatMessage_Ref Class Reference
Inheritance diagram for BBMChatMessage_Ref:
BBMSubElement BBMElementBase


NSString * tag
unsigned long long messageId
- Properties inherited from BBMSubElement
 The parent element.
- Properties inherited from BBMElementBase
 The container (BBMLiveList or BBMLiveMap) holding this element. More...

Additional Inherited Members

- Instance Methods inherited from BBMElementBase
(BBMDSModel *) - masterModel
(id) - objectForKeyedSubscript:
- Class Methods inherited from BBMElementBase
(NSString *) + identifierOfElement:

Detailed Description

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.


Property Documentation

◆ messageId

- (unsigned long long) messageId

The messageId being referenced. If this contains the id of an element that does not currently exist in the 'chatMessage' list, then this message references another message that has been removed. If this is the empty string, then this 'chatMessage' references another message that is not currently known. It could have been deleted or its delivery could have been delayed. If the message becomes known, this 'messageId' will be updated to refer to it.


◆ tag

- (NSString*) tag

Your application-specified tag that indicates what kind of reference it is. A single 'chatMessage' can only have one 'ref' for each tag string. If a tag string appears more than once, subsequent instances are ignored. Edit - This message edits the referenced message. To allow edits from the original sender only, use the following behaviour. If the 'senderUri' matches that of the referenced message, this message's 'content' and/or other fields (depending on what makes sense in your application) should be displayed in place of the 'content' from the original message or any previously received messages with an 'Edit' ref. If the 'senderUri' does not match that of the referenced message, this 'ref' must be ignored (and possibly even removed with 'chatMessageRefRemove') and the message must be treated as if was not an edit.If this message also has a 'refBy' with tag 'Edit', that referencing message must be ignored. An 'Edit' can not itself be edited. Instead, send a new message with an 'Edit' 'ref' to the original message that is to be edited.

Quote - This message quotes the referenced message.

Thread - This message belongs to a thread that has the referenced message as its parent.