code: static void publishBundle(XMPPConnection connection, OmemoDevice userDevice, OmemoBundleElement bundle)
              throws XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException,
              SmackException.NoResponseException {
          PubSubManager pm = PubSubManager.getInstanceFor(connection, connection.getUser().asBareJid());
          pm.tryToPublishAndPossibleAutoCreate(userDevice.getBundleNodeName(), new PayloadItem<>(bundle));
      }
docs: Publish the given OMEMO bundle to the server using PubSub.
  @param connection our connection.
  @param userDevice our device
  @param bundle the bundle we want to publish
  @throws XMPPException.XMPPErrorException
  @throws SmackException.NotConnectedException
  @throws InterruptedException
  @throws SmackException.NoResponseException