TCHMessage Class Reference
| Inherits from | NSObject |
|---|---|
| Declared in | TCHMessage.h |
sid
The unique identifier for this message.
@property (nonatomic, copy, readonly, nullable) NSString *sidDiscussion
The unique identifier for this message.
Declared In
TCHMessage.h
index
Index of Message in the Conversation’s messages stream.
@property (nonatomic, copy, readonly, nullable) NSNumber *indexDiscussion
Index of Message in the Conversation’s messages stream.
By design of the conversations system the message indices may have arbitrary gaps between them, that does not necessarily mean they were deleted or otherwise modified - just that messages may have non-contiguous indices even if they are sent immediately one after another.
Trying to use indices for some calculations is going to be unreliable.
To calculate the number of unread messages it is better to use the read horizon API. See [TCHConversation getUnreadMessagesCountWithCompletion:] for details.
Declared In
TCHMessage.h
author
The identity of the author of the message.
@property (nonatomic, copy, readonly, nullable) NSString *authorDiscussion
The identity of the author of the message.
Declared In
TCHMessage.h
subject
The subject of the message.
@property (nonatomic, copy, readonly, nullable) NSString *subjectDiscussion
The subject of the message.
Declared In
TCHMessage.h
body
The body of the message.
@property (nonatomic, copy, readonly, nullable) NSString *bodyDiscussion
The body of the message.
Declared In
TCHMessage.h
messageType
The type of the message.
@property (nonatomic, assign, readonly) TCHMessageType messageTypeDiscussion
The type of the message.
Declared In
TCHMessage.h
mediaSize
The size of the attached media if present, otherwise 0.
@property (nonatomic, assign, readonly) NSUInteger mediaSizeDiscussion
The size of the attached media if present, otherwise 0.
Declared In
TCHMessage.h
mediaType
The mime type of the attached media if present and specified at creation, otherwise nil.
@property (nonatomic, copy, readonly, nullable) NSString *mediaTypeDiscussion
The mime type of the attached media if present and specified at creation, otherwise nil.
Declared In
TCHMessage.h
mediaFilename
The suggested filename the attached media if present and specified at creation, otherwise nil.
@property (nonatomic, copy, readonly, nullable) NSString *mediaFilenameDiscussion
The suggested filename the attached media if present and specified at creation, otherwise nil.
Declared In
TCHMessage.h
participantSid
The SID of the participant this message is sent by.
@property (nonatomic, copy, readonly, nullable) NSString *participantSidDiscussion
The SID of the participant this message is sent by.
Declared In
TCHMessage.h
participant
The participant this message is sent by.
@property (nonatomic, copy, readonly, nullable) TCHParticipant *participantDiscussion
The participant this message is sent by.
Declared In
TCHMessage.h
dateCreated
The message creation date.
@property (nonatomic, copy, readonly, nullable) NSString *dateCreatedDiscussion
The message creation date.
Declared In
TCHMessage.h
dateCreatedAsDate
The message creation date as an NSDate.
@property (nonatomic, strong, readonly, nullable) NSDate *dateCreatedAsDateDiscussion
The message creation date as an NSDate.
Declared In
TCHMessage.h
dateUpdated
The message last update date.
@property (nonatomic, copy, readonly, nullable) NSString *dateUpdatedDiscussion
The message last update date.
Declared In
TCHMessage.h
dateUpdatedAsDate
The message last update date as an NSDate.
@property (nonatomic, strong, readonly, nullable) NSDate *dateUpdatedAsDateDiscussion
The message last update date as an NSDate.
Declared In
TCHMessage.h
lastUpdatedBy
The identity of the user who updated the message.
@property (nonatomic, copy, readonly, nullable) NSString *lastUpdatedByDiscussion
The identity of the user who updated the message.
Declared In
TCHMessage.h
aggregatedDeliveryReceipt
Aggregated delivery receipt for the message.
@property (readonly, nullable) TCHAggregatedDeliveryReceipt *aggregatedDeliveryReceiptDiscussion
Aggregated delivery receipt for the message.
Declared In
TCHMessage.h
– getDetailedDeliveryReceiptsWithCompletion:
Get detailed delivery receipts for the message.
- (void)getDetailedDeliveryReceiptsWithCompletion:(nonnull TCHDetailedDeliveryReceiptsCompletion)completionParameters
completion |
Completion block that will specify the result of the operation. |
|---|
Discussion
Get detailed delivery receipts for the message.
Declared In
TCHMessage.h
– updateBody:completion:
Update the body of this message
- (void)updateBody:(nonnull NSString *)body completion:(nullable TCHCompletion)completionParameters
body |
The new body for this message. |
|---|---|
completion |
Completion block that will specify the result of the operation. |
Discussion
Update the body of this message
Declared In
TCHMessage.h
– attributes
Return this message’s attributes.
- (nullable TCHJsonAttributes *)attributesReturn Value
The developer-defined extensible attributes for this message.
Discussion
Return this message’s attributes.
Declared In
TCHMessage.h
– setAttributes:completion:
Set this message’s attributes.
- (void)setAttributes:(nullable TCHJsonAttributes *)attributes completion:(nullable TCHCompletion)completionParameters
attributes |
The new developer-defined extensible attributes for this message. (Supported types are NSString, NSNumber, NSArray, NSDictionary and NSNull) |
|---|---|
completion |
Completion block that will specify the result of the operation. |
Discussion
Set this message’s attributes.
Declared In
TCHMessage.h
– hasMedia
Determine if the message has media content.
- (BOOL)hasMediaReturn Value
A true boolean value if this message has media, false otherwise.
Discussion
Determine if the message has media content.
Declared In
TCHMessage.h
– getMediaContentTemporaryUrlWithCompletion:
Retrieve this message’s media temporary link (if there is any media attached). This URL is impermanent, it expires in several minutes. If the link became invalid (expired), need to re-request the new one. It is user’s responsibility to timely download media data by this link.
- (void)getMediaContentTemporaryUrlWithCompletion:(nonnull TCHStringCompletion)completionParameters
completion |
Completion block that will specify the requested URL. If no completion block is specified, no operation will be executed. |
|---|
Discussion
Retrieve this message’s media temporary link (if there is any media attached). This URL is impermanent, it expires in several minutes. If the link became invalid (expired), need to re-request the new one. It is user’s responsibility to timely download media data by this link.
Declared In
TCHMessage.h