SendMessageParams

public final class SendMessageParams

Send message parameters.

Required parameters for sending a normal (non-media) message.

Usage example:

val params = SendMessageParams(TextMessage("Hello")).apply {
pushConfig = PushConfig().apply {
pushContent = "You received a message"
pushData = "{\"key\":\"value\"}"
}
}
channel.sendMessage(params) { msg, error ->
// ...
}

Parameters

content

message content body, a MessageContent or its subclass

Constructors

Link copied to clipboard

Properties

Link copied to clipboard
private final MessageContent content
Link copied to clipboard
private Array<String> directedUserIds

Target user ID list for directed messages.

Link copied to clipboard
private Boolean disableNotification

Whether to disable push notification for this message.

Link copied to clipboard
private Boolean disableUpdateLastMessage

Whether to prevent this message from updating the channel's latest message.

Link copied to clipboard
private Map<String, String> metadata

Message metadata in key-value format.

Link copied to clipboard
private Boolean needReceipt

Whether this message requires a read receipt.

Link copied to clipboard

Push configuration.

Functions

Link copied to clipboard
public final MessageContent getContent()
Link copied to clipboard
public final Array<String> getDirectedUserIds()

Target user ID list for directed messages.

Link copied to clipboard
public final Boolean getDisableNotification()

Whether to disable push notification for this message.

Link copied to clipboard
public final Boolean getDisableUpdateLastMessage()

Whether to prevent this message from updating the channel's latest message.

Link copied to clipboard
public final Map<String, String> getMetadata()

Message metadata in key-value format.

Link copied to clipboard
public final Boolean getNeedReceipt()

Whether this message requires a read receipt.

Link copied to clipboard
public final PushConfig getPushConfig()

Push configuration.

Link copied to clipboard
public final Unit setDirectedUserIds(Array<String> directedUserIds)

Target user ID list for directed messages.

Link copied to clipboard
public final Unit setDisableNotification(Boolean disableNotification)

Whether to disable push notification for this message.

Link copied to clipboard
public final Unit setDisableUpdateLastMessage(Boolean disableUpdateLastMessage)

Whether to prevent this message from updating the channel's latest message.

Link copied to clipboard
public final Unit setMetadata(Map<String, String> metadata)

Message metadata in key-value format.

Link copied to clipboard
public final Unit setNeedReceipt(Boolean needReceipt)

Whether this message requires a read receipt.

Link copied to clipboard
public final Unit setPushConfig(PushConfig pushConfig)

Push configuration.