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 ) ; } }
Encrypt a message for all recipients in the MultiUserChat .