Software /
code /
prosody-modules
Diff
mod_post_msg/mod_post_msg.lua @ 1417:9b6fbababb8c
mod_post_msg: Fix indentation
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Wed, 28 May 2014 20:34:57 +0200 |
parent | 1302:e556219cb43d |
child | 1418:a0375f84d65a |
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;