-
Notifications
You must be signed in to change notification settings - Fork 195
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Send teams message to a chat #657
Comments
Thanks for using PnP Core SDK @vroesgen and for providing feedback. We currently indeed don't offer that feature, but I do agree that our Teams component does require a review and inclusion of more features. In the meanwhile you could consider directly integrating the needed features in your solution via our custom API call feature: see https://pnp.github.io/pnpcore/using-the-sdk/basics-customapirequests.html#making-a-custom-microsoft-graph-request for details. It's super simple to make additional Graph/REST api calls. |
@jansenbe If possible I'd like to work on this issue. |
You're on a roll @MathijsVerbeeck 💪 |
@jansenbe I find it hard to decide on where to add this code to the current structure. Most logically is writing it under the folder "Teams", but this is not really a call referring in Graph to the "teams/" api but it has its own api "chats/" for sending a message specifically to a certain user. Could you assist on deciding this? |
@MathijsVerbeeck : what do you think about the following. Start with adding an IMe property on PnPContext: /// <summary>
/// Entry point for the Me Object
/// </summary>
public IMe Me
{
get
{
(me.Value as Me).PnPContext = this;
return me.Value;
}
}
|
@jansenbe That would work for me, but I'm still stuck with the same question on where to place the new code. Should I create a new folder under sdk/PnP.Core/Model for these specific additions? I'm not yet 100% familiar with the current project structure / how far I can go with adding new implementations |
Let's create /Model/Me/Chat and follow the same structure as the other folders (Internal + Public sub folders). In the Test project also create a folder Me and have a ChatTests.cs file for the test cases. |
@jansenbe Fine for me. Thanks for the information. |
@jansenbe A lot of code is already written under "Teams" e.g. Interface ITeamChatMessage can be reused to add a message to a private / group chat. Am I allowed to add a reference to these classes or should I recreate them under "Me"? |
You can reuse those @MathijsVerbeeck |
@MathijsVerbeeck : Just merged your PR...excellent work again. Thanks a ton!! |
Until now it is only possible to send teams message to a teams channel.
With Graph you can create a chat between users an send messages to it.
Are there any plans to make this possible with PnpCore?
regards to the great team!
The text was updated successfully, but these errors were encountered: