TCHMessage Class Reference
Inherits from | NSObject |
---|---|
Declared in | TCHMessage.h |
sid
The unique identifier for this message.
@property (nonatomic, copy, readonly, nullable) NSString *sid
Discussion
The unique identifier for this message.
Declared In
TCHMessage.h
index
Index of Message in the Channel’s messages stream.
@property (nonatomic, copy, readonly, nullable) NSNumber *index
Discussion
Index of Message in the Channel’s messages stream.
Declared In
TCHMessage.h
author
The identity of the author of the message.
@property (nonatomic, copy, readonly, nullable) NSString *author
Discussion
The identity of the author of the message.
Declared In
TCHMessage.h
body
The body of the message.
@property (nonatomic, copy, readonly, nullable) NSString *body
Discussion
The body of the message.
Declared In
TCHMessage.h
messageType
The type of the message.
@property (nonatomic, assign, readonly) TCHMessageType messageType
Discussion
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 mediaSize
Discussion
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 *mediaType
Discussion
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 *mediaFilename
Discussion
The suggested filename the attached media if present and specified at creation, otherwise nil.
Declared In
TCHMessage.h
member
The member this message is sent by.
@property (nonatomic, copy, readonly, nullable) TCHMember *member
Discussion
The member this message is sent by.
Declared In
TCHMessage.h
timestamp
The creation timestamp of the message.
@property (nonatomic, copy, readonly, nullable) NSString *timestamp
Discussion
The creation timestamp of the message.
Declared In
TCHMessage.h
lastUpdatedBy
The identity of the user who last updated the message.
@property (nonatomic, copy, readonly, nullable) NSString *lastUpdatedBy
Discussion
The identity of the user who last updated the message.
Declared In
TCHMessage.h
– updateBody:completion:
Update the body of this message
- (void)updateBody:(nonnull NSString *)body completion:(nullable TCHCompletion)completion
Parameters
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 NSDictionary<NSString*,id> *)attributes
Return 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 NSDictionary<NSString*,id> *)attributes completion:(nullable TCHCompletion)completion
Parameters
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)hasMedia
Return Value
A true boolean value if this message has media, false otherwise.
Discussion
Determine if the message has media content.
Declared In
TCHMessage.h
– getMediaWithOutputStream:onStarted:onProgress:onCompleted:completion:
Retrieve this message’s attached media, if there is any.
- (void)getMediaWithOutputStream:(nonnull NSOutputStream *)mediaStream onStarted:(nullable TCHMediaOnStarted)onStarted onProgress:(nullable TCHMediaOnProgress)onProgress onCompleted:(nullable TCHMediaOnCompleted)onCompleted completion:(nullable TCHCompletion)completion
Parameters
mediaStream |
An instance of NSOutputStream you create that the media will be written to. |
---|---|
onStarted |
Callback block which is called when the media download starts. |
onProgress |
Callback block which is called as download progresses with the most recent number of bytes read. |
onCompleted |
Callback block which is called upon media download completion with the media’s sid if successful. |
completion |
Completion block that will specify the result of the operation. |
Discussion
Retrieve this message’s attached media, if there is any.
Declared In
TCHMessage.h