Changeset

7956:beaeafedc2d7

mod_message: Return early on messages of type error (silences empty if branch warning) [luacheck]
author Kim Alvefur <zash@zash.se>
date Mon, 06 Mar 2017 15:27:37 +0100
parents 7955:bba71bfe2154
children 7957:083c062c2fb7 7959:3941d609ff85
files plugins/mod_message.lua
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/mod_message.lua	Mon Mar 06 15:24:44 2017 +0100
+++ b/plugins/mod_message.lua	Mon Mar 06 15:27:37 2017 +0100
@@ -20,7 +20,7 @@
 
 	local t = stanza.attr.type;
 	if t == "error" then
-		-- discard
+		return true; -- discard
 	elseif t == "groupchat" then
 		origin.send(st.error_reply(stanza, "cancel", "service-unavailable"));
 	elseif t == "headline" then