![](/img/trans.png)
[英]Send IM message to specific user in the conversation Lync 2013 SDK in UI suppression mode
[英]How to retrieve IM message from lync client 2013 communication
我正在使用lync 2013 sdk,我需要在通話結束時創建帶有會話IM消息的任務。
我想要一些方法conversation.getIMmessage()
等。
我該怎么實現呢。
因此,假設您使用的是Lync Client SDK,則需要將接收到的IM的事件處理程序添加到對話中每個參與者的IM形式。 最好以相反的順序考慮:
為要添加到對話中的參與者設置事件處理程序:
Conversation.ParticipantAdded += Conversation_ParticipantAdded;
在該事件處理程序中,獲取該參與者的IM Modality,如下所示:
var imModality = Conversation.Participants.Single(p => p.Contact.Uri.Equals(newParticipantSIP, StringComparison.CurrentCultureIgnoreCase)).Modalities[ModalityTypes.InstantMessage] as InstantMessageModality;
然后將IM接收的事件處理程序添加到該模式:
imModality.InstantMessageReceived += (sender, e) =>
{
DoStuff(e.Text);
};
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.