this question的答案解释了Office 365群组中对话和conversationThreads之间的区别。
然而,它没有解决 EDIT 中的观点,即通过Graph API创建新线程始终会创建新会话,而不是< em>现有会话中的新主题,正如the documentation似乎暗示的那样。
是否可以在同一个对话中创建多个线程:
有没有人有各自的例子?
为了说明我的问题 - 我的小组中有一个对话:
GET https://graph.microsoft.com/v1.0/groups/41ea432e-441c-4394-8e5f-1914d3c9d41c/conversations
Status Code: 200
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#groups('41ea432e-441c-4394-8e5f-1914d3c9d41c')/conversations",
"value": [
{
"id": "AAQkADI2ZTIzMDBmLTUyZGMtNDM5My04ODhkLTVkMjY0Y2E2MjYyZAAQAN2s7czbc3VGnHoiI2lG2To=",
"topic": "Conversation 1",
"hasAttachments": false,
"lastDeliveredDateTime": "2017-02-24T14:03:57Z",
"uniqueSenders": [
"Peter Reay"
],
"preview": "..."
}
]
}
它有一个主题:
GET https://graph.microsoft.com/v1.0/groups/41ea432e-441c-4394-8e5f-1914d3c9d41c/conversations/AAQkADI2ZTIzMDBmLTUyZGMtNDM5My04ODhkLTVkMjY0Y2E2MjYyZAAQAN2s7czbc3VGnHoiI2lG2To=/threads
Status Code: 200
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#groups('41ea432e-441c-4394-8e5f-1914d3c9d41c')/conversations('AAQkADI2ZTIzMDBmLTUyZGMtNDM5My04ODhkLTVkMjY0Y2E2MjYyZAAQAN2s7czbc3VGnHoiI2lG2To%3D')/threads",
"value": [
{
"id": "AAQkADI2ZTIzMDBmLTUyZGMtNDM5My04ODhkLTVkMjY0Y2E2MjYyZAMkABAA3aztzNtzdUaceiIjaUbZOhAA3aztzNtzdUaceiIjaUbZOg==",
"topic": "Conversation 1",
"hasAttachments": false,
"lastDeliveredDateTime": "2017-02-24T14:03:57Z",
"uniqueSenders": [
"Peter Reay"
],
"preview": "...",
"isLocked": false
}
]
}
所以,我尝试创建一个新线程:
POST https://graph.microsoft.com/v1.0/groups/41ea432e-441c-4394-8e5f-1914d3c9d41c/conversations/AAQkADI2ZTIzMDBmLTUyZGMtNDM5My04ODhkLTVkMjY0Y2E2MjYyZAAQAN2s7czbc3VGnHoiI2lG2To=/threads
{
"topic": "topic-value-2",
"posts": [{
"body": {
"contentType": "html",
"content": "Topic 2 Post 1"
}
}]
}
Status Code: 201
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#groups('41ea432e-441c-4394-8e5f-1914d3c9d41c')/conversations('AAQkADI2ZTIzMDBmLTUyZGMtNDM5My04ODhkLTVkMjY0Y2E2MjYyZAAQAN2s7czbc3VGnHoiI2lG2To%3D')/threads/$entity",
"id": "AAQkADI2ZTIzMDBmLTUyZGMtNDM5My04ODhkLTVkMjY0Y2E2MjYyZAMkABAAn4DeT-lo0kS-qbfmsKjLZxAAn4DeT-lo0kS-qbfmsKjLZw=="
}
但是,我尝试获取线程,看到对话仍然只有一个线程:
GET https://graph.microsoft.com/v1.0/groups/41ea432e-441c-4394-8e5f-1914d3c9d41c/conversations/AAQkADI2ZTIzMDBmLTUyZGMtNDM5My04ODhkLTVkMjY0Y2E2MjYyZAAQAN2s7czbc3VGnHoiI2lG2To=/threads
Status Code: 200
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#groups('41ea432e-441c-4394-8e5f-1914d3c9d41c')/conversations('AAQkADI2ZTIzMDBmLTUyZGMtNDM5My04ODhkLTVkMjY0Y2E2MjYyZAAQAN2s7czbc3VGnHoiI2lG2To%3D')/threads",
"@odata.nextLink": "https://graph.microsoft.com/v1.0/groups/41ea432e-441c-4394-8e5f-1914d3c9d41c/conversations/AAQkADI2ZTIzMDBmLTUyZGMtNDM5My04ODhkLTVkMjY0Y2E2MjYyZAAQAN2s7czbc3VGnHoiI2lG2To=/threads?$skip=1",
"value": [
{
"id": "AAQkADI2ZTIzMDBmLTUyZGMtNDM5My04ODhkLTVkMjY0Y2E2MjYyZAMkABAA3aztzNtzdUaceiIjaUbZOhAA3aztzNtzdUaceiIjaUbZOg==",
"topic": "Conversation 1",
"hasAttachments": false,
"lastDeliveredDateTime": "2017-02-24T14:03:57Z",
"uniqueSenders": [
"Peter Reay"
],
"preview": "...",
"isLocked": false
}
]
}
我们看到,如果我再次检索对话,则会有一个新的对话:
GET https://graph.microsoft.com/v1.0/groups/41ea432e-441c-4394-8e5f-1914d3c9d41c/conversations
Status Code: 200
{
"@odata.context": "https://graph.microsoft.com/v1.0/$metadata#groups('41ea432e-441c-4394-8e5f-1914d3c9d41c')/conversations",
"value": [
{
"id": "AAQkADI2ZTIzMDBmLTUyZGMtNDM5My04ODhkLTVkMjY0Y2E2MjYyZAAQAJ_A3k-5aNJEv6m35rCoy2c=",
"topic": "topic-value-2",
"hasAttachments": false,
"lastDeliveredDateTime": "2017-02-24T14:12:44Z",
"uniqueSenders": [
"Peter Reay"
],
"preview": "Topic 2 Post 1"
},
{
"id": "AAQkADI2ZTIzMDBmLTUyZGMtNDM5My04ODhkLTVkMjY0Y2E2MjYyZAAQAN2s7czbc3VGnHoiI2lG2To=",
"topic": "Conversation 1",
"hasAttachments": false,
"lastDeliveredDateTime": "2017-02-24T14:03:57Z",
"uniqueSenders": [
"Peter Reay"
],
"preview": "..."
}
]
}
即。已创建新的会话,而不是现有会话中的新主题,文档似乎建议这样做。
任何人都可以解释这种行为,并举例说明同一对话中的多个线程吗?
谢谢