/** * Sends the message to the given destination. * * @param destination the destination that should receive the message. */ default void to(MessageLocation destination) { to(destination.target()).through(destination.channel()); }
@Override public String create(Verifiable object, String type, String description) { String token = this.repository.create(object, type); messageSender.send(message("To confirm '[aa]" + description + "[/aa]' use the token '[a]" + token + "[/a]'.\n" + "If you didn't request this, just ignore this message.") .withTitle("Please confirm your request")) .to(object.tokenDestination()); return token; }