Commit 44fd26c5 authored by Christian Schudt's avatar Christian Schudt

XEP-0016 error messages should set correct from attribute (the sender).

See XEP-0016, example 50.
parent f999e759
......@@ -99,6 +99,7 @@ public class OfflineMessageStrategy extends BasicModule implements ServerFeature
if (list != null && list.shouldBlockPacket(message)) {
Message result = message.createCopy();
result.setTo(message.getFrom());
result.setFrom(message.getTo());
result.setError(PacketError.Condition.service_unavailable);
XMPPServer.getInstance().getRoutingTable().routePacket(message.getFrom(), result, true);
return;
......
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