code: 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));
          }
      }
docs: Handler for adding new key group
  
  @param uid      User's id
  @param keyGroup Added key group