comparison mod_message_logging/mod_message_logging.lua @ 1505:ba71d0ad5564

mod_message_logging/mod_message_logging.lua: Fix missing 'or'
author daurnimator <quae@daurnimator.com>
date Tue, 16 Sep 2014 17:32:45 -0400
parents 4b55110b0aa8
children
comparison
equal deleted inserted replaced
1504:b8164f18142a 1505:ba71d0ad5564
65 65
66 if message_type == "error" then return; end 66 if message_type == "error" then return; end
67 67
68 local from, to = jid_bare(stanza.attr.from), jid_bare(stanza.attr.to or stanza.attr.from); 68 local from, to = jid_bare(stanza.attr.from), jid_bare(stanza.attr.to or stanza.attr.from);
69 if message_type == "groupchat" then 69 if message_type == "groupchat" then
70 from = from.." <"..select(3, jid_split(stanza.attr.from))..">"; 70 from = from.." <"..(select(3, jid_split(stanza.attr.from)) or "")..">";
71 end 71 end
72 write_to_log(to, from, "RECV", stanza:get_child_text("body")); 72 write_to_log(to, from, "RECV", stanza:get_child_text("body"));
73 end 73 end
74 74
75 local function handle_outgoing_message(event) 75 local function handle_outgoing_message(event)