-
Notifications
You must be signed in to change notification settings - Fork 62
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
Chat Features: Create, Get, List, Update #219
Conversation
Other implemented valuetypes are not in alphabetical order - I think we need to fix this.
I cannot see an example in this where the tests would destroy the resources created as a check? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @Threpio, thanks for working on this, it is looking good so far! I have made some suggestions/comments below - if you can looka t these I'll be happy to review again. Thanks!
msgraph/chat_test.go
Outdated
ChatType: utils.StringPtr(msgraph.ChatTypeGroup), | ||
Members: &[]msgraph.ConversationMember{ | ||
{ | ||
ID: user1.Id, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since these are bind records, it looks like the odata type is required here, and also the ID needs to be sent as a full odata ID.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I apologize for taking this PR on without understanding this part.
Can you link an example of where the OdataID is passed in a full context? I must be missing the apparent examples elsewhere in the code.
My understanding from your first part is that it needs to be:
{
ODataType: odata.TypeConversationMember
ID: user1.Id,
Roles: &[]string{"owner"},
},
And then the odata.TypeConversationMember be added as a type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Threpio No apologies are needed - thank you for working on this, it is very appreciated.
Perhaps it is also possible to specify the regular ID and a type instead of the OData ID?
I noted my original comment from the docs where there is an example showing members being set using an OData bind field:
There are other places in the SDK where we handle this type of field, for example see the Group
model:
The Members
field marshals to members@odata.bind
and it should be populated by the user with OData IDs, which take the form: https://graph.microsoft.com/v1/users/00000000-0000-0000-0000-000000000000
You should be able to re-use the Members
type here too, as this has its own marshaler and unmarshaler funcs to help with parsing values.
Hope this helps!
Co-authored-by: Tom Bamford <tom@bamford.io>
Co-authored-by: Tom Bamford <tom@bamford.io>
Co-authored-by: Tom Bamford <tom@bamford.io>
@manicminer - I have added the Odata type to the conversation member to be requested in tests. I am fairly certain my answer to the binding of the ID is completely wrong. Let me know :)) |
Hi @Threpio, sorry about letting this PR slip. I realise it's been some time, but I have merged in {
"error": {
"code": "Forbidden",
"message": "OperationFailed",
"innerError": {
"code": "200",
"message": "DisablePartialSuccess-Create Thread: One or more members cannot be added to the thread roster",
"date": "2024-06-05T23:43:44",
"request-id": "bd004a22-dc4c-4d31-aa76-cf3135c4435b",
"client-request-id": "bd004a22-dc4c-4d31-aa76-cf3135c4435b"
}
}
} If you'd like to take another look at this, I'll be happy to get this in. But if not, no worries at all, we can close this off and hopefully support this in our upcoming newer SDK. |
@manicminer @Threpio any updates on this? I want to integrate the ms graph teams API features into my app. I wonder if I can use that with the current SDK main? |
@Threpio Thanks for working on this. Sorry that I wasn't able to spend more time trying to help get this to work. Also @ch3eck, I am going to deprecate this project very soon. We (HashiCorp) recently released a Microsoft Graph SDK that is now being used exclusively in the Terraform AzureAD provider instead of this SDK. I encourage you to take a look at the new SDK and consider migrating your project. Many of the same paradigms have been implemented in the new SDK, with many improvements, and because the new SDK is auto-generated, it has massively more coverage. For this use case, the new SDK has support for many different operations under the Accordingly, I'm going to close this PR prior to archiving this project. Thanks again for looking at this, and please consider looking at the new HashiCorp MS Graph SDK. |
@manicminer thanks for the heads up, one think I couldn't find any examples when looking at the Hashicorp SDK, I have a couple of questions here: #287? Any pointers on the Hashicorp Graph SDK would be helpful |
@ch3ck I've written up a small example to go in the readme which you can see here. For more detailed examples, take a look at the AzureAD Terraform provider which has adopted the new SDK. For your other questions, I'll shoot a reply on the issue you opened. |
A simplified PR that contains most of the object modelling AND the basic Chat feature functionalities. #195
Other 'Message handling' features will be included in a future PR