X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/ce70a623c21a267679d59838d041f9bc1d486cd9..5d83e149b3ed61683da20bba6703a37db66f93cf:/lib/src/main/java/org/asamk/signal/manager/TrustLevel.java diff --git a/lib/src/main/java/org/asamk/signal/manager/TrustLevel.java b/lib/src/main/java/org/asamk/signal/manager/TrustLevel.java index fead442c..9d58754c 100644 --- a/lib/src/main/java/org/asamk/signal/manager/TrustLevel.java +++ b/lib/src/main/java/org/asamk/signal/manager/TrustLevel.java @@ -41,4 +41,11 @@ public enum TrustLevel { case TRUSTED_VERIFIED -> VerifiedMessage.VerifiedState.VERIFIED; }; } + + public boolean isTrusted() { + return switch (this) { + case TRUSTED_UNVERIFIED, TRUSTED_VERIFIED -> true; + case UNTRUSTED -> false; + }; + } }