Changeset

8486:c50101b527bf

MUC: Hook the correct event
author Kim Alvefur <zash@zash.se>
date Sat, 23 Dec 2017 06:17:11 +0100
parents 8485:0e02c6de5c02
children 8487:91f6815de26a
files plugins/muc/muc.lib.lua
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/plugins/muc/muc.lib.lua	Sat Dec 09 19:35:08 2017 +0100
+++ b/plugins/muc/muc.lib.lua	Sat Dec 23 06:17:11 2017 +0100
@@ -172,10 +172,10 @@
 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