Interface ITeamChatMessage
Represents an individual chat message within a channel or chat. The chat message can be a root chat message or part of a reply thread that is defined by the replyToId property in the chat message.
Inherited Members
Namespace: PnP.Core.Model.Teams
Assembly: PnP.Core.dll
Syntax
public interface ITeamChatMessage : IDataModel<ITeamChatMessage>, IDataModelParent, IDataModelWithContext, ISupportModules<ITeamChatMessage>, IDataModelGet<ITeamChatMessage>, IDataModelLoad<ITeamChatMessage>, IQueryableDataModel
Properties
Attachments
Attached files
Declaration
ITeamChatMessageAttachmentCollection Attachments { get; }
Property Value
ITeamChatMessageAttachmentCollection
|
Body
Plaintext/HTML representation of the content of the chat message. Representation is specified by the contentType inside the body. The content is always in HTML if the chat message contains a chatMessageMention.
Declaration
ITeamChatMessageContent Body { get; }
Property Value
ITeamChatMessageContent
|
ChannelIdentity
Channel identity reference
Declaration
ITeamChannelIdentity ChannelIdentity { get; }
Property Value
ITeamChannelIdentity
|
CreatedDateTime
Read only. Timestamp of when the chat message was created.
Declaration
DateTimeOffset CreatedDateTime { get; }
Property Value
DateTimeOffset
|
DeletedDateTime
Read only. Timestamp at which the chat message was deleted, or null if not deleted.
Declaration
DateTimeOffset DeletedDateTime { get; }
Property Value
DateTimeOffset
|
Etag
Read-only. Version number of the chat message.
Declaration
string Etag { get; }
Property Value
System.String
|
From
Read only. Details of the sender of the chat message.
Declaration
ITeamIdentitySet From { get; }
Property Value
ITeamIdentitySet
|
HostedContents
Hosted Content tiles
Declaration
ITeamChatMessageHostedContentCollection HostedContents { get; }
Property Value
ITeamChatMessageHostedContentCollection
|
Id
Read-only. Unique Id of the message.
Declaration
string Id { get; }
Property Value
System.String
|
Importance
The importance of the chat message.
Declaration
ChatMessageImportance Importance { get; set; }
Property Value
ChatMessageImportance
|
LastModifiedDateTime
Read only. Timestamp of when the chat message is created or edited, including when a reply is made (if it's a root chat message in a channel) or a reaction is added or removed.
Declaration
DateTimeOffset LastModifiedDateTime { get; }
Property Value
DateTimeOffset
|
Locale
Locale of the team chat message
Declaration
string Locale { get; set; }
Property Value
System.String
|
Mentions
List of entities mentioned in the chat message. Currently supports user, bot, team, channel.
Declaration
ITeamChatMessageMentionCollection Mentions { get; }
Property Value
ITeamChatMessageMentionCollection
|
MessageType
The type of chat message. The possible values are: message.
Declaration
ChatMessageType MessageType { get; set; }
Property Value
ChatMessageType
|
Reactions
Reactions for this chat message (for example, Like).
Declaration
ITeamChatMessageReactionCollection Reactions { get; }
Property Value
ITeamChatMessageReactionCollection
|
Replies
Collection of replies for a message
Implements
See Requesting model collections
and IQueryable performance considerations to learn more.
Declaration
ITeamChatMessageReplyCollection Replies { get; }
Property Value
ITeamChatMessageReplyCollection
|
ReplyToId
Read-only. Id of the parent chat message or root chat message of the thread. (Only applies to chat messages in channels not chats)
Declaration
string ReplyToId { get; }
Property Value
System.String
|
Subject
The subject of the chat message, in plaintext.
Declaration
string Subject { get; set; }
Property Value
System.String
|
Summary
Summary text of the chat message that could be used for push notifications and summary views or fall back views. Only applies to channel chat messages, not chat messages in a chat.
Declaration
string Summary { get; set; }
Property Value
System.String
|
WebUrl
The Web URL of the team chat message
Declaration
Uri WebUrl { get; }
Property Value
Uri
|
Methods
AddReply(ChatMessageOptions)
Adds a reply to an existing message
Declaration
ITeamChatMessageReply AddReply(ChatMessageOptions options)
Parameters
ChatMessageOptions
options
Options for the reply to create |
Returns
ITeamChatMessageReply
Newly added reply |
AddReply(String, ChatMessageContentType, String)
Adds a reply to an existing message
Declaration
ITeamChatMessageReply AddReply(string content, ChatMessageContentType contentType = ChatMessageContentType.Text, string subject = null)
Parameters
System.String
content
Content of the reply |
ChatMessageContentType
contentType
Reply content type e.g. Text, Html |
System.String
subject
Reply Subject |
Returns
ITeamChatMessageReply
Newly added reply |
AddReplyAsync(ChatMessageOptions)
Adds a reply to an existing message
Declaration
Task<ITeamChatMessageReply> AddReplyAsync(ChatMessageOptions options)
Parameters
ChatMessageOptions
options
Options for the reply to create |
Returns
Task<ITeamChatMessageReply>
Newly added reply |
AddReplyAsync(String, ChatMessageContentType, String)
Adds a reply to an existing message
Declaration
Task<ITeamChatMessageReply> AddReplyAsync(string content, ChatMessageContentType contentType = ChatMessageContentType.Text, string subject = null)
Parameters
System.String
content
Content of the message |
ChatMessageContentType
contentType
Message content type e.g. Text, Html |
System.String
subject
Message Subject |
Returns
Task<ITeamChatMessageReply>
Newly added reply |
AddReplyBatch(ChatMessageOptions)
Adds a reply to an existing message
Declaration
ITeamChatMessageReply AddReplyBatch(ChatMessageOptions options)
Parameters
ChatMessageOptions
options
Options for the reply to create |
Returns
ITeamChatMessageReply
Newly added reply |
AddReplyBatch(Batch, ChatMessageOptions)
Adds a reply to an existing message
Declaration
ITeamChatMessageReply AddReplyBatch(Batch batch, ChatMessageOptions options)
Parameters
Batch
batch
Batch the reply is associated with |
ChatMessageOptions
options
Options for the reply to create |
Returns
ITeamChatMessageReply
Newly added reply |
AddReplyBatch(Batch, String, ChatMessageContentType, String)
Adds a reply to an existing message
Declaration
ITeamChatMessageReply AddReplyBatch(Batch batch, string content, ChatMessageContentType contentType = ChatMessageContentType.Text, string subject = null)
Parameters
Batch
batch
Batch the reply is associated with |
System.String
content
Content of the reply |
ChatMessageContentType
contentType
Reply content type e.g. Text, Html |
System.String
subject
Reply Subject |
Returns
ITeamChatMessageReply
Newly added reply |
AddReplyBatch(String, ChatMessageContentType, String)
Adds a reply to an existing message
Declaration
ITeamChatMessageReply AddReplyBatch(string content, ChatMessageContentType contentType = ChatMessageContentType.Text, string subject = null)
Parameters
System.String
content
Content of the Reply |
ChatMessageContentType
contentType
Reply content type e.g. Text, Html |
System.String
subject
Reply Subject |
Returns
ITeamChatMessageReply
Newly added reply |
AddReplyBatchAsync(ChatMessageOptions)
Adds a reply to an existing message
Declaration
Task<ITeamChatMessageReply> AddReplyBatchAsync(ChatMessageOptions options)
Parameters
ChatMessageOptions
options
Options for the reply to create |
Returns
Task<ITeamChatMessageReply>
Newly added reply |
AddReplyBatchAsync(Batch, ChatMessageOptions)
Adds a reply to an existing message
Declaration
Task<ITeamChatMessageReply> AddReplyBatchAsync(Batch batch, ChatMessageOptions options)
Parameters
Batch
batch
Batch the reply is associated with |
ChatMessageOptions
options
Options for the reply to create |
Returns
Task<ITeamChatMessageReply>
Newly added reply |
AddReplyBatchAsync(Batch, String, ChatMessageContentType, String)
Adds a reply to an existing message
Declaration
Task<ITeamChatMessageReply> AddReplyBatchAsync(Batch batch, string content, ChatMessageContentType contentType = ChatMessageContentType.Text, string subject = null)
Parameters
Batch
batch
Batch the reply is associated with |
System.String
content
Content of the reply |
ChatMessageContentType
contentType
Reply content type e.g. Text, Html |
System.String
subject
Reply Subject |
Returns
Task<ITeamChatMessageReply>
Newly added reply |
AddReplyBatchAsync(String, ChatMessageContentType, String)
Adds a reply to an existing message
Declaration
Task<ITeamChatMessageReply> AddReplyBatchAsync(string content, ChatMessageContentType contentType = ChatMessageContentType.Text, string subject = null)
Parameters
System.String
content
Content of the Reply |
ChatMessageContentType
contentType
Reply content type e.g. Text, Html |
System.String
subject
Reply Subject |
Returns
Task<ITeamChatMessageReply>
Newly added reply |