ChatThreadClient.SendMessage Method

Definition

Overloads

SendMessage(SendChatMessageOptions, CancellationToken)

Sends a message to a thread.

SendMessage(String, ChatMessageType, String, CancellationToken)

Sends a message to a thread.

SendMessage(SendChatMessageOptions, CancellationToken)

Source:
ChatThreadClient.cs
Source:
ChatThreadClient.cs

Sends a message to a thread.

public virtual Azure.Response<Azure.Communication.Chat.SendChatMessageResult> SendMessage (Azure.Communication.Chat.SendChatMessageOptions options, System.Threading.CancellationToken cancellationToken = default);
abstract member SendMessage : Azure.Communication.Chat.SendChatMessageOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Communication.Chat.SendChatMessageResult>
override this.SendMessage : Azure.Communication.Chat.SendChatMessageOptions * System.Threading.CancellationToken -> Azure.Response<Azure.Communication.Chat.SendChatMessageResult>
Public Overridable Function SendMessage (options As SendChatMessageOptions, Optional cancellationToken As CancellationToken = Nothing) As Response(Of SendChatMessageResult)

Parameters

options
SendChatMessageOptions

Options for the message.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

The server returned an error. See Message for details returned from the server.

Applies to

SendMessage(String, ChatMessageType, String, CancellationToken)

Source:
ChatThreadClient.cs
Source:
ChatThreadClient.cs

Sends a message to a thread.

public virtual Azure.Response<Azure.Communication.Chat.SendChatMessageResult> SendMessage (string content, Azure.Communication.Chat.ChatMessageType type = default, string senderDisplayName = default, System.Threading.CancellationToken cancellationToken = default);
abstract member SendMessage : string * Azure.Communication.Chat.ChatMessageType * string * System.Threading.CancellationToken -> Azure.Response<Azure.Communication.Chat.SendChatMessageResult>
override this.SendMessage : string * Azure.Communication.Chat.ChatMessageType * string * System.Threading.CancellationToken -> Azure.Response<Azure.Communication.Chat.SendChatMessageResult>
Public Overridable Function SendMessage (content As String, Optional type As ChatMessageType = Nothing, Optional senderDisplayName As String = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Response(Of SendChatMessageResult)

Parameters

content
String

Message content.

type
ChatMessageType

The chat message type.

senderDisplayName
String

The display name of the message sender. This property is used to populate sender name for push notifications.

cancellationToken
CancellationToken

The cancellation token to use.

Returns

Exceptions

The server returned an error. See Message for details returned from the server.

Applies to