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.sendUserMessagewill 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) throwsParameters
encoderEncoderinstance -
Default constructor.
Declaration
Swift
public required init(from decoder: Decoder) throwsParameters
decoderDecoderinstance -
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) -> BoolParameters
pollUpdateEventPollUpdateEventinstanceReturn Value
trueif 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) -> BoolParameters
pollVoteEventPollVoteEventinstanceReturn Value
trueif 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?) -> BoolParameters
objectAnyinstanceReturn Value
trueif same otherwisefalse -
Copies this object
Declaration
Swift
public override func copy(with zone: NSZone? = nil) -> AnyParameters
zoneoptional
NSZoneReturn Value
UserMessageinstance -
Deserializes and reconstructs the object
Declaration
Swift
public final class override func build(fromSerializedData data: Data?) -> Self?Parameters
dataDatainstanceReturn Value
UserMessageif parameter is valid, otherwisenil
View on GitHub
Install in Dash