fix: Better logic when to auto-trigger self-sign
This commit is contained in:
parent
1f7e517dbf
commit
34b15e45fc
|
|
@ -692,7 +692,11 @@ class OpenSSSS {
|
||||||
// first try to cache all secrets that aren't cached yet
|
// first try to cache all secrets that aren't cached yet
|
||||||
await maybeCacheAll();
|
await maybeCacheAll();
|
||||||
// now try to self-sign
|
// now try to self-sign
|
||||||
if (ssss.encryption.crossSigning.enabled && ssss.client.isUnknownSession) {
|
if (ssss.encryption.crossSigning.enabled &&
|
||||||
|
ssss.client.userDeviceKeys[ssss.client.userID]?.masterKey != null &&
|
||||||
|
(ssss.client.isUnknownSession ||
|
||||||
|
!ssss.client.userDeviceKeys[ssss.client.userID].masterKey
|
||||||
|
.directVerified)) {
|
||||||
try {
|
try {
|
||||||
await ssss.encryption.crossSigning.selfSign(openSsss: this);
|
await ssss.encryption.crossSigning.selfSign(openSsss: this);
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue