UserMessage
open class UserMessage: BaseMessage
Represents a mesage object that contains a text message. Derived from BaseMessage
.
-
The poll that is linked to this message
Since
4.1.0Declaration
Swift
public internal(set) var poll: Poll?
-
The translated message text.
Declaration
Swift
public let translations: [String: String]
-
The list of target translation languages with the language codes. The messages that have been sent or scheduled with translation option
BaseChannel.sendUserMessage
will have this list.Since
4.0.0Declaration
Swift
public private(set) var translationTargetLanguages: [String]
-
The review information of message
Since
4.12.0Declaration
Swift
public internal(set) var messageReviewInfo: MessageReviewInfo?
-
Encodes this object.
Declaration
Swift
public override func encode(to encoder: Encoder) throws
Parameters
encoder
Encoder
instance -
Default constructor.
Declaration
Swift
public required init(from decoder: Decoder) throws
Parameters
decoder
Decoder
instance -
Applies updated poll data to this message object.
This method is designed to be called when
didUpdatePoll(:_)
event passes the poll objectSince
4.1.0Declaration
Swift
public func apply(pollUpdateEvent: PollUpdateEvent) -> Bool
Parameters
pollUpdateEvent
PollUpdateEvent
instanceReturn Value
true
if event is successfuly applied -
Applies updated poll data to this message object.
This method is designed to be called when
didVotePoll(_:)
event passes the vote event objectSince
4.1.0Declaration
Swift
public func apply(pollVoteEvent: PollVoteEvent) -> Bool
Parameters
pollVoteEvent
PollVoteEvent
instanceReturn Value
true
if event is successfuly applied all -
Undocumented
Declaration
Swift
public func getUserMessageParams() -> UserMessageCreateParams?
-
Compares this object with given other object.
Declaration
Swift
public override func isEqual(_ object: Any?) -> Bool
Parameters
object
Any
instanceReturn Value
true
if same otherwisefalse
-
Copies this object
Declaration
Swift
public override func copy(with zone: NSZone? = nil) -> Any
Parameters
zone
optional
NSZone
Return Value
UserMessage
instance -
Deserializes and reconstructs the object
Declaration
Swift
public final class override func build(fromSerializedData data: Data?) -> Self?
Parameters
data
Data
instanceReturn Value
UserMessage
if parameter is valid, otherwisenil