comparison mod_ignore_host_chatstates/mod_ignore_host_chatstates.lua @ 3419:aed47ebd26d3

mod_ignore_host_chatstates: Discard chat state messages sent to a bare host Prevents annoying error replies to be sent in reply to such empty chat state messages. Useful in combination with modules that handle messages to a host.
author Kim Alvefur <zash@zash.se>
date Fri, 28 Dec 2018 04:23:30 +0100
parents
children
comparison
equal deleted inserted replaced
3418:9be9dd434813 3419:aed47ebd26d3
1 module:hook("message/host", function (event)
2 local stanza = event.stanza;
3 if #stanza.tags == 1 and stanza.tags[1].attr.xmlns == "http://jabber.org/protocol/chatstates" then
4 return true;
5 end
6 end, -10);