watchOnlineState error 错误码248是什么原因

yy 11月前 624

watchOnlineState error 错误码248是什么原因 store.js下方法setCurrentConversationInfo setCurrentConversationInfo(conversationInfo) { if (!conversationInfo) { if (conversationState.currentConversationInfo) { let conversation = conversationState.currentConversationInfo.conversation; if ([ConversationType.Single, ConversationType.Group].indexOf(conversation.type) >= 0) { wfc.unwatchOnlineState(conversation.type, [conversation.target]); } else if (conversation.type === ConversationType.Channel) { let content = new LeaveChannelChatMessageContent(); wfc.sendConversationMessage(conversation, content); } else if (conversation.type === ConversationType.ChatRoom) { wfc.quitChatroom(conversation.target) } } conversationState.currentConversationInfo = null; conversationState.shouldAutoScrollToBottom = false; conversationState.currentConversationMessageList.length = 0; conversationState.currentConversationOldestMessageId = 0; conversationState.currentConversationOldestMessageUid = 0; conversationState.currentConversationRead = null; conversationState.enableMessageMultiSelection = false;

  • return;
  • }
  • if (conversationState.currentConversationInfo && conversationState.currentConversationInfo.conversation.equal(conversationInfo.conversation)) {
  • return;
  • }
  • let conversation = conversationInfo.conversation;
  • if (conversation.type === ConversationType.Group || (conversation.type === ConversationType.Single && !wfc.isMyFriend(conversation.target))) {
  • wfc.watchOnlineState(conversation.type, [conversation.target], 1000, (states) => {
  • states.forEach((e => {
  • miscState.userOnlineStateMap.set(e.userId, e);
  • }))
  • this._patchCurrentConversationOnlineStatus();
  • }, (err) => {
  • console.log('watchOnlineState error', err);
  • })
  • }
  • if (conversation.type === ConversationType.Channel) {
  • let content = new EnterChannelChatMessageContent();
  • wfc.sendConversationMessage(conversation, content);
  • } else if (conversation.type === ConversationType.ChatRoom) {
  • wfc.joinChatroom(conversation.target);
  • }
  • conversationState.currentConversationInfo = conversationInfo;
  • conversationState.shouldAutoScrollToBottom = true;
  • conversationState.currentConversationMessageList.length = 0;
  • conversationState.currentConversationOldestMessageId = 0;
  • conversationState.currentConversationOldestMessageUid = 0;
  • this._loadCurrentConversationMessages();
  • conversationState.currentConversationRead = wfc.getConversationRead(conversationInfo.conversation);
  • conversationState.enableMessageMultiSelection = false;
  • conversationState.showChannelMenu = false;
  • if (conversation.type === ConversationType.Channel) {
  • let channelInfo = wfc.getChannelInfo(conversation.target, true);
  • if (channelInfo.menus && channelInfo.menus.length > 0) {
  • conversationState.showChannelMenu = true;
  • }
  • } else if (conversation.type === ConversationType.Group) {
  • wfc.getGroupInfo(conversation.target, true);
  • } else if (conversation.type === ConversationType.Single) {
  • wfc.getUserInfo(conversation.target, true);
  • }
  • conversationState.quotedMessage = null;
  • conversationState.currentVoiceMessage = null;
  • clearTimeout(conversationState.inputClearHandler);
  • conversationState.inputtingUser = null;
  • pickState.messages.length = 0;
  • },
最新回复 (3)
  • x86 11月前
    引用 2
    要专业版im-server才支持在线状态,请确认
  • yy 11月前
    引用 3
    好的
  • HeavyRain 11月前
    引用 4
    专业版IM服务有个开关,需要打开才行,如果专业版IM服务没有打开也是248
返回