我想以编程方式阅读 Lync IM 聊天对话。由于 Lync 客户端将其 IM 日志存储到 .HIST 文件中。有谁知道 .HIST 文件的格式或如何读取该文件?
我还了解到,通过使用 Lync SDK,我们可以获得 Lync IM 聊天对话。 http://blog.thoughtstuff.co.uk/2013/01/tracking-lync-conversations-in-code/这个博客讲述了如何将音频-视频通话对话跟踪到代码中。谁能告诉我如何实现阅读 IM 聊天对话?
我想以编程方式阅读 Lync IM 聊天对话。由于 Lync 客户端将其 IM 日志存储到 .HIST 文件中。有谁知道 .HIST 文件的格式或如何读取该文件?
我还了解到,通过使用 Lync SDK,我们可以获得 Lync IM 聊天对话。 http://blog.thoughtstuff.co.uk/2013/01/tracking-lync-conversations-in-code/这个博客讲述了如何将音频-视频通话对话跟踪到代码中。谁能告诉我如何实现阅读 IM 聊天对话?
您可以在 PaticipantAdded 事件下收听 InstantMessageRecieved 事件。参考下面的示例代码:
// Add ParticipantAdded event
conversation.ParticipantAdded += this.Conversation_ParticipantAdded;
private void Conversation_ParticipantAdded(object sender, ParticipantCollectionChangedEventArgs e) {
var instantMessageModality = e.Participant.Modalities[ModalityTypes.InstantMessage] as InstantMessageModality;
instantMessageModality.InstantMessageReceived += this.Participant_InstantMessageReceived;
}
private void Participant_InstantMessageReceived(object sender, MessageSentEventArgs e) {
// Use e.Text to read the chat information
}