if (notification == null) {
failedSendingUserNotification(con, daos, it, envelope, notification);
return;
}
UserEx sender = UserDAOFacade.getUserEx(con, daos, notification.getUserId());
if (sender == null) {
Logger.warn("sendTwitterMessage : sender is null.");
failedSendingUserNotification(con, daos, it, envelope, notification);
return;
}
UserTwitterLink twitterLinkage = sender.getTwitterLinkage();
if (twitterLinkage == null || !twitterLinkage.isAuthorized()) {
Logger.warn("sendTwitterMessage : envelope id " + envelope.getId() + " could not be sent : No access token");
failedSendingUserNotification(con, daos, it, envelope, notification);
return;
}