File tree 1 file changed +4
-2
lines changed
1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -718,7 +718,9 @@ let store = {
718
718
if ( ! conversationInfo ) {
719
719
if ( conversationState . currentConversationInfo ) {
720
720
let conversation = conversationState . currentConversationInfo . conversation ;
721
- wfc . unwatchOnlineState ( conversation . type , [ conversation . target ] ) ;
721
+ if ( wfc . isUserOnlineStateEnabled ( ) ) {
722
+ wfc . unwatchOnlineState ( conversation . type , [ conversation . target ] ) ;
723
+ }
722
724
if ( conversation . type === ConversationType . Channel ) {
723
725
let content = new LeaveChannelChatMessageContent ( ) ;
724
726
wfc . sendConversationMessage ( conversation , content ) ;
@@ -739,7 +741,7 @@ let store = {
739
741
return ;
740
742
}
741
743
let conversation = conversationInfo . conversation ;
742
- if ( conversation . type === ConversationType . Group || ( conversation . type === ConversationType . Single && ! wfc . isMyFriend ( conversation . target ) ) ) {
744
+ if ( wfc . isUserOnlineStateEnabled ( ) && ( conversation . type === ConversationType . Group || ( conversation . type === ConversationType . Single && ! wfc . isMyFriend ( conversation . target ) ) ) ) {
743
745
wfc . watchOnlineState ( conversation . type , [ conversation . target ] , 1000 , ( states ) => {
744
746
states . forEach ( ( e => {
745
747
miscState . userOnlineStateMap . set ( e . userId , e ) ;
You can’t perform that action at this time.
0 commit comments