private void onPublicKeysGroupAdded ( int uid , ApiEncryptionKeyGroup keyGroup ) { UserKeys userKeys = getCachedUserKeys ( uid ) ; if ( userKeys == null ) { return ; } UserKeysGroup validatedKeysGroup = validateUserKeysGroup ( uid , keyGroup ) ; if ( validatedKeysGroup != null ) { UserKeys updatedUserKeys = userKeys . addUserKeyGroup ( validatedKeysGroup ) ; cacheUserKeys ( updatedUserKeys ) ; context ( ) . getEncryption ( ) . getEncryptedChatManager ( uid ) . send ( new EncryptedPeerActor . KeyGroupUpdated ( userKeys ) ) ; } }
Handler for adding new key group