mirror of
https://github.com/signalapp/Signal-Server
synced 2026-04-27 07:43:17 +01:00
Fix for inactive auth problem
This commit is contained in:
@@ -66,7 +66,7 @@ public class AccountAuthenticator implements Authenticator<BasicCredentials, Acc
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
if (!device.get().isMaster() && !device.get().isActive()) {
|
||||
if (!device.get().isMaster() && device.get().isIdleInactive()) {
|
||||
return Optional.empty();
|
||||
}
|
||||
|
||||
|
||||
@@ -195,7 +195,11 @@ public class Device {
|
||||
boolean hasChannel = fetchesMessages || !Util.isEmpty(getApnId()) || !Util.isEmpty(getGcmId());
|
||||
|
||||
return (id == MASTER_ID && hasChannel && signedPreKey != null) ||
|
||||
(id != MASTER_ID && hasChannel && signedPreKey != null && lastSeen > (System.currentTimeMillis() - TimeUnit.DAYS.toMillis(30)));
|
||||
(id != MASTER_ID && hasChannel && signedPreKey != null && !isIdleInactive());
|
||||
}
|
||||
|
||||
public boolean isIdleInactive() {
|
||||
return id != MASTER_ID && lastSeen < (System.currentTimeMillis() - TimeUnit.DAYS.toMillis(30));
|
||||
}
|
||||
|
||||
public boolean getFetchesMessages() {
|
||||
|
||||
Reference in New Issue
Block a user