UCMA,如何使用InstantMessageReceviedEventArgs参数识别MessageReceived事件中的conferenceID。 [英] UCMA, how to identify conferenceID in MessageReceived event with InstantMessageReceviedEventArgs parameter.

查看:177
本文介绍了UCMA,如何使用InstantMessageReceviedEventArgs参数识别MessageReceived事件中的conferenceID。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好,


我正在实施与UCMA 2.0的网络聊天。基本思想是使用Web服务实现EndUserPoint,它协调匿名Web用户和内部支持之间的对话。由于内部支持人员可以同时与多个匿名用户聊天,因此当触发MessageReceived事件时,我需要找出此消息是针对哪个匿名用户的。我在UCMA 2.0中的事件MessageReceived的InstantMessageReceviedEventArgs中找不到任何标识信息。在旧的Ajax API中,它具有conferenceID。有人可以帮我这个吗?我真的很感激。



谢谢,



Jun

解决方案

在MessageReceived事件中,如果转换它,则sender参数应为InstantMessagingFlow对象。
如果为InstantMessagingCall对象创建InstantMessagingFlow对象的字典,则可以将对话视为InstantMessagingCall上的属性Conversation(继承自基础c少女电话)。您可以在 InstantMessagingFlowConfigurationRequested 事件的处理程序中创建字典。

您可以通过指向对话的指针来索引您的匿名用户通过对话.Id属性并以这种方式匹配它们。

可能有另一种方法可以做到这一点,但这似乎是最方便的。

Niko


Hello,

   I am implementing a web chat with UCMA 2.0. The basic idea is to use a web service to implement an EndUserPoint which coordinates the conversation between anonymous web users and internal supports. Since a internal support person can chat with several anonymous users at the same time, when the MessageReceived event is triggered, I need find out this message is for which anonymous user. I could not find any identification information in the InstantMessageReceviedEventArgs of event MessageReceived in UCMA 2.0. In old Ajax API, it has conferenceID. Anyone can help me with this? I really appreciate it.

 

Thanks,

 

Jun

解决方案

In the MessageReceived event, the sender argument should be the InstantMessagingFlow object if you cast it.
If you create a dictionary of InstantMessagingFlow objects to InstantMessagingCall objects, you can find the conversation as the property Conversation on InstantMessagingCall (inherited from the base class Call). You can create the dictionary in the handler for the InstantMessagingFlowConfigurationRequested event.

You can index your anonymous users by pointers to Conversations or by conversation.Id property and match them up that way.

There may be another way to do this, but this seems to be the most convenient.

Niko


这篇关于UCMA,如何使用InstantMessageReceviedEventArgs参数识别MessageReceived事件中的conferenceID。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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