slack-webhook
slack-webhook copied to clipboard
SlackAttachment.setTimestamp(Date date) throws NullPointerException
Null-check is needed for the setter with Date param because mappers like Mapstruct are mapping null value to it. I had to make a workaround in my mapper like this:
@Mapping(target = "timestamp", expression = "java(slackAttachment.getTimestamp() == null ? null : slackAttachment.getTimestamp().getTime() / 1000L)")