changeset 1417:9b6fbababb8c

mod_post_msg: Fix indentation
author Kim Alvefur <zash@zash.se>
date Wed, 28 May 2014 20:34:57 +0200
parents 7ddb522d9b28
children a0375f84d65a
files mod_post_msg/mod_post_msg.lua
diffstat 1 files changed, 7 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mod_post_msg/mod_post_msg.lua	Thu May 22 08:30:16 2014 +0200
+++ b/mod_post_msg/mod_post_msg.lua	Wed May 28 20:34:57 2014 +0200
@@ -48,14 +48,14 @@
 	elseif body_type == "application/x-www-form-urlencoded" then
 		local post_body = formdecode(request.body);
 		message = msg({ to = post_body.to or to, from = authed_user,
-				type = post_body.type or "chat"}, post_body.body);
+		                type = post_body.type or "chat"}, post_body.body);
 		if post_body.html then
-		   local html, err = xml.parse(post_body.html);
-		   if not html then
-		      module:log("warn", "mod_post_msg: invalid XML: %s", err);
-		      return 400;
-		   end
-		   message:tag("html", {xmlns="http://jabber.org/protocol/xhtml-im"}):add_child(html):up();
+			local html, err = xml.parse(post_body.html);
+			if not html then
+				module:log("warn", "mod_post_msg: invalid XML: %s", err);
+				return 400;
+			end
+			message:tag("html", {xmlns="http://jabber.org/protocol/xhtml-im"}):add_child(html):up();
 		end
 	else
 		return 415;