mod_dialback: Fix logic bug - we should have both a to and from at this point
[prosody.git] / plugins / mod_dialback.lua
index c239250225c5cb5b86f59f5e4fd29464e9e30f5b..3d1fe0e178eeb81a823006771fe906960d6881a1 100644 (file)
@@ -91,7 +91,7 @@ module:hook("stanza/jabber:server:dialback:result", function(event)
                        origin.to_host = nameprep(attr.to);
                end
 
-               if not origin.from_host and not origin.to_host then
+               if not origin.from_host or not origin.to_host then
                        origin.log("debug", "Improper addressing supplied, no to or from?");
                        origin:close("improper-addressing");
                end