在团队中检索消息的历史记录

时间:2019-12-05 21:07:31

标签: microsoft-graph

使用图形浏览器查看我团队的通道的消息数据时,我注意到一个etag属性,并且想知道该属性的用途。

我问的原因是,当编辑一条消息时此属性会更改,并希望它可以将我链接到当前消息中的预编辑消息。请注意,Microsoft可能没有存储原始消息。

在查询https://graph.microsoft.com/beta/teams/ {group-id-for-teams} / channels / {channel-id} / messages / {message-id}

时,这是该属性的一小段
{
    "@odata.context": "<redacted>",
    "id": "157540775----",
    "replyToId": null,
    "etag": "15754980----",
    "messageType": "message",
    "createdDateTime": "2019-12-03T21:15:58.713Z",
    "lastModifiedDateTime": "2019-12-04T22:21:28.967Z",
    "deletedDateTime": null,
    ...
}

感谢您的帮助!

1 个答案:

答案 0 :(得分:0)

Microsoft Teams不存储聊天消息的历史记录。您只能知道lastModifiedDateTime属性是否为null时消息是否已被修改。

etag属性是根据documentation的聊天消息的版本号。我想如何在存储聊天消息的应用程序中使用它,并且需要知道他们存储的消息信息是否陈旧并且需要更新。