You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, thanks for providing us with a great library.
What we would like to do is update the body of messages sent to Teams and reply to them.
Due to the current SDK specification, there is no way to retrieve Teams messages by themselves,
First, a list of messages must be retrieved, and then the messages must be filtered to update the body of the message and reply to it.
ex) Getting Chat Message replies
channel=awaitchannel.GetAsync(o =>o.Messages);varchatMessage=channel.Messages.AsRequested().FirstOrDefault();// must be load all messages// Get the repliesvarreplies=chatMessage.Replies;
If there are a large number of messages in the channel, the API call will take a large amount of time (even if only one reply is written) because the body of the message cannot be updated or replied to without first reading the entire volume of messages.
Therefore, please implement a model for retrieving messages by themselves, specifying the message ID and reply ID.
We have considered the following method implementations, but you are free to change them if you find a more suitable form or implementation location
// get a messageITeamChatMessagesingle_message=PnPContext.Team.Channels.GetByDisplayName("General").GetByMessageId("id_of_message");// and load ITeamChannel.Messages//update message(exists method)single_message.UpdateAsync();// get a replyITeamChatMessageReplysingle_reply=single_message.GetByReplyId("id_of_reply");// and load ITeamChatMessage.Replies
Model
Model: Team, Team.Channels, Team.Channel.Messages
APIs
Microsoft Graph V1
Get a message in a chat
API: https://graph.microsoft.com/v1.0/teams/{team-id}/channels/<channel-id>/messages/<message-id>
Get reply to a message
API: https://graph.microsoft.com/v1.0/teams/{team-id}/channels/<channel-id>/messages/<message-id>/replies/<reply-id>
Category
Describe the domain model extension
First of all, thanks for providing us with a great library.
What we would like to do is update the body of messages sent to Teams and reply to them.
Due to the current SDK specification, there is no way to retrieve Teams messages by themselves,
First, a list of messages must be retrieved, and then the messages must be filtered to update the body of the message and reply to it.
ex) Getting Chat Message replies
If there are a large number of messages in the channel, the API call will take a large amount of time (even if only one reply is written) because the body of the message cannot be updated or replied to without first reading the entire volume of messages.
Therefore, please implement a model for retrieving messages by themselves, specifying the message ID and reply ID.
We have considered the following method implementations, but you are free to change them if you find a more suitable form or implementation location
Model
Model: Team, Team.Channels, Team.Channel.Messages
APIs
Microsoft Graph V1
Get a message in a chat
API:
https://graph.microsoft.com/v1.0/teams/{team-id}/channels/<channel-id>/messages/<message-id>
Get reply to a message
API:
https://graph.microsoft.com/v1.0/teams/{team-id}/channels/<channel-id>/messages/<message-id>/replies/<reply-id>
Additional Information
Get chatMessage in a channel or chat
The text was updated successfully, but these errors were encountered: