Mercurial > prosody-modules
diff mod_muc_intercom/mod_muc_intercom.lua @ 253:7410d1005fea
mod_muc_intercom: Fix traceback on topic changes
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 26 Sep 2010 18:23:24 +0200 |
parents | fbddb9db1c82 |
children | 6d72c5172c74 |
line wrap: on
line diff
--- a/mod_muc_intercom/mod_muc_intercom.lua Mon Sep 20 21:10:49 2010 +0100 +++ b/mod_muc_intercom/mod_muc_intercom.lua Sun Sep 26 18:23:24 2010 +0200 @@ -19,6 +19,7 @@ local from_room, from_host, from_nick = jid.split(from_room_jid); local body = stanza:get_child("body"); + if not body then return; end -- No body, like topic changes body = body and body:get_text(); -- I feel like I want to do `or ""` there :/ local target_room, message = body:match("^@([^:]+):(.*)"); if not target_room or not message then return; end