Commit 467a6b40 authored by Tom Evans's avatar Tom Evans

Merge pull request #532 from sco0ter/privacylists

XEP-0016 error messages should set correct from attribute (the sender).
parents 2cf5afc9 44fd26c5
...@@ -99,6 +99,7 @@ public class OfflineMessageStrategy extends BasicModule implements ServerFeature ...@@ -99,6 +99,7 @@ public class OfflineMessageStrategy extends BasicModule implements ServerFeature
if (list != null && list.shouldBlockPacket(message)) { if (list != null && list.shouldBlockPacket(message)) {
Message result = message.createCopy(); Message result = message.createCopy();
result.setTo(message.getFrom()); result.setTo(message.getFrom());
result.setFrom(message.getTo());
result.setError(PacketError.Condition.service_unavailable); result.setError(PacketError.Condition.service_unavailable);
XMPPServer.getInstance().getRoutingTable().routePacket(message.getFrom(), result, true); XMPPServer.getInstance().getRoutingTable().routePacket(message.getFrom(), result, true);
return; 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