Добавил метод в 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
955d7b4841
commit
f561786d58
@ -4,6 +4,7 @@ import dev.struchkov.godfather.main.domain.content.Mail;
|
|||||||
import dev.struchkov.godfather.telegram.domain.attachment.ButtonClickAttachment;
|
import dev.struchkov.godfather.telegram.domain.attachment.ButtonClickAttachment;
|
||||||
import dev.struchkov.godfather.telegram.main.core.util.Attachments;
|
import dev.struchkov.godfather.telegram.main.core.util.Attachments;
|
||||||
|
|
||||||
|
import java.util.Arrays;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
import java.util.function.Predicate;
|
import java.util.function.Predicate;
|
||||||
|
|
||||||
@ -41,4 +42,8 @@ public class UnitTrigger {
|
|||||||
.isPresent();
|
.isPresent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static Predicate<Mail> isPersonId(String... personId) {
|
||||||
|
return mail -> Arrays.stream(personId).anyMatch(id -> id.equals(mail.getFromPersonId()));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user