只有在重新登录的时候清除锁定

This commit is contained in:
heavyrian2012
2026-02-24 10:37:21 +08:00
parent 8f74e54c88
commit 969de83e1f
3 changed files with 17 additions and 7 deletions
@@ -26,6 +26,11 @@ public class GetTokenHandler extends IMHandler<WFCMessage.GetTokenRequest> {
if(userInfo != null && userInfo.getType() == 1) {
return ErrorCode.ERROR_CODE_ROBOT_NO_TOKEN;
}
if((session.isPcClient() || session.isPadClient())) {
if(m_messagesStore.isLocked(session.getUsername(), session.getClientID())) {
m_messagesStore.updateUserSettings(session.getUsername(), WFCMessage.ModifyUserSettingReq.newBuilder().setScope(UserSettingScopeLockPC).setKey(session.getClientID()).setValue("0").build(), null);
}
}
TokenAuthenticator authenticator = new TokenAuthenticator();
String strToken = authenticator.generateToken(fromUser);