Commit 41b001b9 authored by Florian Schmaus's avatar Florian Schmaus

Shorten if/else statement in OfflineMessageStrategy

and add some comments.
parent 3a532cb2
......@@ -117,12 +117,12 @@ public class OfflineMessageStrategy extends BasicModule {
// For a message stanza of type "normal", "groupchat", or "headline", the server MUST either (a) silently ignore the stanza
// or (b) return an error stanza to the sender, which SHOULD be <service-unavailable/>.
if (message.getType() == Message.Type.normal || message.getType() == Message.Type.groupchat || message.getType() == Message.Type.headline) {
// Depending on the OfflineMessageStragey, we may silently ignore or bounce
if (type == Type.bounce) {
bounce(message);
return;
} else {
return;
}
// Either bounce or silently ignore, never store such messages
return;
}
// For a message stanza of type "error", the server MUST silently ignore the stanza.
else if (message.getType() == Message.Type.error) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment