diff --git a/keyserver/src/utils/olm-utils.js b/keyserver/src/utils/olm-utils.js --- a/keyserver/src/utils/olm-utils.js +++ b/keyserver/src/utils/olm-utils.js @@ -253,6 +253,12 @@ contentAccount: OlmAccount, notifAccount: OlmAccount, ): Promise { + if (contentAccount.unpublished_prekey()) { + await publishPrekeysToIdentity(contentAccount, notifAccount); + contentAccount.mark_prekey_as_published(); + notifAccount.mark_prekey_as_published(); + return; + } // Since keys are rotated synchronously, only check validity of one if (shouldRotatePrekey(contentAccount)) { contentAccount.generate_prekey();