if (!accountVerification.verifyAccountExists(receiver)) {
logger.warn("cannot relay to unexisting receiver {} stanza {}", receiver.getFullQualifiedName(), stanza.toString());
return new RelayResult(new NoSuchLocalUserException());
} else if (offlineStanzaReceiver != null) {
offlineStanzaReceiver.receive(stanza);
return new RelayResult(new DeliveredToOfflineReceiverException());
} else {
logger.warn("cannot relay to offline receiver {} stanza {}", receiver.getFullQualifiedName(), stanza.toString());
return new RelayResult(new LocalRecipientOfflineException());
}
}