Добавил новый UnitTrigger
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
872c5f4886
commit
04e5d3435b
@ -54,6 +54,13 @@ public class UnitTrigger {
|
|||||||
.isPresent();
|
.isPresent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Predicate<Mail> isButtonClickArgValue(String argType, String argValue) {
|
||||||
|
return mail -> Attachments.findFirstButtonClick(mail.getAttachments())
|
||||||
|
.flatMap(click -> click.getArgByType(argType))
|
||||||
|
.filter(buttonArg -> argValue.equals(buttonArg.getValue()))
|
||||||
|
.isPresent();
|
||||||
|
}
|
||||||
|
|
||||||
public static Predicate<Mail> isPersonId(String... personId) {
|
public static Predicate<Mail> isPersonId(String... personId) {
|
||||||
return mail -> Arrays.stream(personId).anyMatch(id -> id.equals(mail.getFromPersonId()));
|
return mail -> Arrays.stream(personId).anyMatch(id -> id.equals(mail.getFromPersonId()));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user