code: public MamPrefsResult updateArchivingPreferences(MamPrefs mamPrefs) throws NoResponseException, XMPPErrorException,
                      NotConnectedException, InterruptedException, NotLoggedInException {
          MamPrefsIQ mamPrefIQ = mamPrefs.constructMamPrefsIq();
          return queryMamPrefs(mamPrefIQ);
      }
docs: Update the preferences in the server.
  
  @param mamPrefs
  @return the currently active preferences after the operation.
  @throws NoResponseException
  @throws XMPPErrorException
  @throws NotConnectedException
  @throws InterruptedException
  @throws NotLoggedInException
  @since 4.3.0