isUntrusted: Return false if firstUse is true

Because users will see this upon first trying to communicate with a new
contact if they're quick about it.

FREEBIE
This commit is contained in:
Scott Nonnenberg 2017-07-25 11:33:02 -07:00
parent f38d715250
commit ef3431af1b
2 changed files with 75 additions and 6 deletions

View file

@ -726,7 +726,8 @@
var identityRecord = new IdentityRecord({id: identifier});
identityRecord.fetch().then(function() {
if (Date.now() - identityRecord.get('timestamp') < TIMESTAMP_THRESHOLD
&& !identityRecord.get('nonblockingApproval')) {
&& !identityRecord.get('nonblockingApproval')
&& !identityRecord.get('firstUse')) {
resolve(true);
} else {
resolve(false);