code: public OmemoMessage.Sent encrypt(MultiUserChat muc, String message)
              throws UndecidedOmemoIdentityException, CryptoFailedException,
              XMPPException.XMPPErrorException, SmackException.NotConnectedException, InterruptedException,
              SmackException.NoResponseException, NoOmemoSupportException,
              SmackException.NotLoggedInException {
          synchronized (LOCK) {
              if (!multiUserChatSupportsOmemo(muc)) {
                  throw new NoOmemoSupportException();
              }
  
              Set<BareJid> recipients = new HashSet<>();
  
              for (EntityFullJid e : muc.getOccupants()) {
                  recipients.add(muc.getOccupant(e).getJid().asBareJid());
              }
              return encrypt(recipients, message);
          }
      }
docs: Encrypt a message for all recipients in the MultiUserChat.
  
  @param muc multiUserChat
  @param message message to send
  @return encrypted message
  @throws UndecidedOmemoIdentityException when there are undecided devices.
  @throws CryptoFailedException
  @throws XMPPException.XMPPErrorException
  @throws SmackException.NotConnectedException
  @throws InterruptedException
  @throws SmackException.NoResponseException
  @throws NoOmemoSupportException When the muc doesn't support OMEMO.
  @throws SmackException.NotLoggedInException