如何以编程方式读取Lync 2013 IM消息

问题描述 投票:0回答:1

我想以编程方式阅读Lync IM聊天对话。由于Lync Client将其IM日志存储到.HIST文件中。有谁知道.HIST文件的格式或如何读取这个文件?

我还读到,通过使用Lync SDK,我们可以获得Lync IM聊天对话。 http://blog.thoughtstuff.co.uk/2013/01/tracking-lync-conversations-in-code/这个博客讲述了如何跟踪音频 - 视频通话对话代码。任何人都可以告诉我如何实现阅读IM聊天对话?

lync lync-2013 lync-client-sdk
1个回答
0
投票

您可以在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
  }
© www.soinside.com 2019 - 2024. All rights reserved.