it.auties.whatsapp.model.chat.GroupPolicy Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of whatsappweb4j Show documentation
Show all versions of whatsappweb4j Show documentation
Standalone fully-featured Whatsapp Web API for Java and Kotlin
package it.auties.whatsapp.model.chat;
import it.auties.whatsapp.api.Whatsapp;
/**
* The constants of this enumerated type describe the various policies that can be enforced for a
* {@link GroupSetting} in a {@link Chat}. Said chat should be a group: {@link Chat#isGroup()}. Said
* actions can be executed using various methods in {@link Whatsapp}.
*/
public enum GroupPolicy {
/**
* Allows both admins and users
*/
ANYONE,
/**
* Allows only admins
*/
ADMINS;
/**
* Returns a GroupPolicy based on a boolean value obtained from Whatsapp
*
* @param input the boolean value obtained from Whatsapp
* @return a non-null GroupPolicy
*/
public static GroupPolicy of(boolean input) {
return input ? ADMINS : ANYONE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy