// the presence priority is optional, but if contained, it might become relevant for
// message delivery (see RFC3921bis-05#8.3.1.1)
registry.setResourcePriority(resourceId, presenceStanza.getPrioritySafe());
// check for pending offline stored stanzas, and send them out
OfflineStorageProvider offlineProvider = (OfflineStorageProvider) serverRuntimeContext
.getStorageProvider(OfflineStorageProvider.class);
if (offlineProvider == null) {
logger.warn("No Offline Storage Provider configured");
} else {
Collection<Stanza> offlineStanzas = offlineProvider.getStanzasForBareJID(user.getBareJID().getFullQualifiedName());
for (Stanza stanza : offlineStanzas) {
logger.debug("Sending out delayed offline stanza");
relayStanza(user, stanza, sessionContext);
}
}