【发布时间】:2016-08-21 00:03:21
【问题描述】:
我使用了 skype sdk Here,这是我的代码 sn-p
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
【问题讨论】:
标签: javascript asynchronous skype skype-for-business