Update device enabled criteria

// FREEBIE
This commit is contained in:
Moxie Marlinspike
2016-03-24 16:28:29 -07:00
parent d3023a0068
commit f9acd6a66b
3 changed files with 5 additions and 5 deletions

View File

@@ -194,7 +194,7 @@ public class Device {
public boolean isActive() {
boolean hasChannel = fetchesMessages || !Util.isEmpty(getApnId()) || !Util.isEmpty(getGcmId());
return (id == MASTER_ID && hasChannel) ||
return (id == MASTER_ID && hasChannel && signedPreKey != null) ||
(id != MASTER_ID && hasChannel && signedPreKey != null && lastSeen > (System.currentTimeMillis() - TimeUnit.DAYS.toMillis(30)));
}