两次使用Skype SDK Here这里是我的代码片段消息显示使用Skype SDK聊天
config.conversation.historyService.activityItems.added(function(newMsg) {
if(typeof newMsg.direction != 'function') {} else {
if(newMsg.direction() == 'Incoming') {
direction = "black";
} else if(newMsg.direction() == 'Outgoing' && newMsg.status() === "Succeeded") {
direction = "green";
} else {}
$("#conversationText").append('<br/><div class="chat-user-info"><h1 class="chat-user-name">' + newMsg.sender.displayName() + '</h1><h2 class="chat-user-time">' + new Date() + '</h2></div><div class="chat-user-message"><h3 style="color:' + direction + ';">' + newMsg.text() + '</h3></div><br/>');
}
});
但是,当它是在国家尚未了结或即使失败后出现的消息,在此之后我尝试把消息放在里面,但它只出现在另一边,而不是我的。
Github上相关的问题Here
感谢回答....我写这个条件是因为它监听事件两次,一次是针对baseModel对象,另一个是针对Message对象......其中一个抛出异常,如果没有处理它 – abdoutelb
好吧,我没有看到这种类型的错误,但我认为他们已经改变了例子a位。 您是否尝试过使用我的解决方案打印一些日志? 尝试打印每个时间的状态和方向 – Lemni
对于迟到抱歉,我测试了你的代码实际上消息状态可能是“等待中” - “待定”,那么它“成功”或“失败”,在成功或失败的情况下,发送给对方。所以它不能写在我身边,但在那里传递。 – abdoutelb