From 1e543ef1918cf5ca0b3aa1569074db05f78f1fc0 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Sat, 23 Dec 2017 06:17:11 +0100 Subject: MUC: Hook the correct event --- plugins/muc/muc.lib.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/muc/muc.lib.lua') diff --git a/plugins/muc/muc.lib.lua b/plugins/muc/muc.lib.lua index 9f9ae13a..d9e9c48a 100644 --- a/plugins/muc/muc.lib.lua +++ b/plugins/muc/muc.lib.lua @@ -172,10 +172,10 @@ function room_mt:broadcast_message(stanza) end -- Strip delay tags claiming to be from us -module:hook("muc-occupant-message", function (event) +module:hook("muc-occupant-groupchat", function (event) local stanza = event.stanza; - local to = stanza.attr.to; - local room_jid = self.jid; + local room = event.room; + local room_jid = room.jid; stanza:maptags(function (child) if child.name == "delay" and child.attr["xmlns"] == "urn:xmpp:delay" then -- cgit v1.2.3