private Promise < PrivateKey > fetchPreKey ( long keyId ) { try { return Promise . success ( ManagedList . of ( ownKeys . getPreKeys ( ) ) . filter ( PrivateKey . PRE_KEY_EQUALS_ID ( keyId ) ) . first ( ) ) ; } catch ( Exception e ) { Log . d ( TAG , "Unable to find own pre key #" + keyId ) ; throw e ; } }
Fetching own pre key by id