# HG changeset patch
# User Kim Alvefur <zash@zash.se>
# Date 1577892955 -3600
# Node ID 0dede5b0ab2708bdfd3997cd15ac7081c489b1fe
# Parent  aa1ad69c7c10e8bc23a23051557d17262b15238f
mod_rest: Fix return status when sending and forgetting

Turns out module:send() doesn't return anything, so there's no way to
know if it was routed successfully.

diff -r aa1ad69c7c10 -r 0dede5b0ab27 mod_rest/mod_rest.lua
--- a/mod_rest/mod_rest.lua	Wed Jan 01 16:21:28 2020 +0100
+++ b/mod_rest/mod_rest.lua	Wed Jan 01 16:35:55 2020 +0100
@@ -133,11 +133,8 @@
 			response:send(encode(send_type, stanza));
 			return true;
 		end
-		if module:send(payload, origin) then
-			return 202;
-		else
-			return 500;
-		end
+		module:send(payload, origin);
+		return 202;
 	end
 end