如何从lync客户端2013年通讯检索IM消息 [英] How to retrieve IM message from lync client 2013 communication

查看:102
本文介绍了如何从lync客户端2013年通讯检索IM消息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用lync 2013 sdk,我需要在通话结束时创建带有对话IM消息的任务.

I am using lync 2013 sdk and i need to create a task with conversation IM message on the end of call.

我想要一些方法-conversation.getIMmessage()等.

我该怎么实现.

推荐答案

因此,假设您使用的是Lync Client SDK,则需要将针对接收到的IM的事件处理程序添加到会话中每个参与者的IM方式中.最好以相反的顺序考虑:-

So assuming you are using the Lync Client SDK you are going to need to add an event handler for IM received to the IM modality of each participant in a conversation. This is best considered in reverse order:-

为要添加到对话中的参与者设置事件处理程序:-

Set up an event handler for participant being added to a conversation:-

Conversation.ParticipantAdded += Conversation_ParticipantAdded;

在该事件处理程序中,获取该参与者的IM Modality,如下所示:-

In that event handler get the IM Modality for that participant, with something like:-

var imModality = Conversation.Participants.Single(p => p.Contact.Uri.Equals(newParticipantSIP, StringComparison.CurrentCultureIgnoreCase)).Modalities[ModalityTypes.InstantMessage] as InstantMessageModality;

然后将IM接收的事件处理程序添加到该模式:-

And then add a IM received event handler to the modality:-

imModality.InstantMessageReceived += (sender, e) =>
                {
                    DoStuff(e.Text);
                };

这篇关于如何从lync客户端2013年通讯检索IM消息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆