修正在线状态错误问题
This commit is contained in:
@@ -2326,11 +2326,6 @@ public class MemoryMessagesStore implements IMessagesStore {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (session.getPlatform() == Platform_LINUX || session.getPlatform() == Platform_Windows || session.getPlatform() == Platform_OSX) {
|
|
||||||
updateUserSettings(session.username, WFCMessage.ModifyUserSettingReq.newBuilder().setScope(kUserSettingPCOnline).setKey("PC").setValue(online ? (System.currentTimeMillis() + "|" + session.getPlatform() + "|" + session.getClientID() + "|" + session.getPhoneName()) : "").build(), session.clientID);
|
|
||||||
} else if (session.getPlatform() == Platform_iPad || session.getPlatform() == Platform_APad) {
|
|
||||||
updateUserSettings(session.username, WFCMessage.ModifyUserSettingReq.newBuilder().setScope(kUserSettingPCOnline).setKey("Pad").setValue(online ? (System.currentTimeMillis() + "|" + session.getPlatform() + "|" + session.getClientID() + "|" + session.getPhoneName()) : "").build(), session.clientID);
|
|
||||||
} else {
|
|
||||||
String pcValue = null;
|
String pcValue = null;
|
||||||
String padValue = null;
|
String padValue = null;
|
||||||
for (MemorySessionStore.Session s : m_Server.getStore().sessionsStore().sessionForUser(session.username)) {
|
for (MemorySessionStore.Session s : m_Server.getStore().sessionsStore().sessionForUser(session.username)) {
|
||||||
@@ -2375,7 +2370,6 @@ public class MemoryMessagesStore implements IMessagesStore {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ErrorCode modifyUserStatus(String userId, int status) {
|
public ErrorCode modifyUserStatus(String userId, int status) {
|
||||||
|
|||||||
@@ -622,14 +622,15 @@ public class ProtocolProcessor {
|
|||||||
if(session != null) {
|
if(session != null) {
|
||||||
session.refreshLastActiveTime();
|
session.refreshLastActiveTime();
|
||||||
forwardOnlineStatusEvent(username, clientID, session.getPlatform(), clearSession ? UserOnlineStatus.LOGOUT : UserOnlineStatus.OFFLINE, session.getAppName());
|
forwardOnlineStatusEvent(username, clientID, session.getPlatform(), clearSession ? UserOnlineStatus.LOGOUT : UserOnlineStatus.OFFLINE, session.getAppName());
|
||||||
m_messagesStore.updateUserOnlineSetting(session, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ConnectionDescriptor oldConnDescr = new ConnectionDescriptor(clientID, channel);
|
ConnectionDescriptor oldConnDescr = new ConnectionDescriptor(clientID, channel);
|
||||||
if(connectionDescriptors.removeConnection(oldConnDescr)) {
|
if(connectionDescriptors.removeConnection(oldConnDescr)) {
|
||||||
m_interceptor.notifyClientConnectionLost(clientID, username);
|
m_interceptor.notifyClientConnectionLost(clientID, username);
|
||||||
}
|
}
|
||||||
|
if(session != null) {
|
||||||
|
m_messagesStore.updateUserOnlineSetting(session, false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user