mod_muc_rai/mod_muc_rai.lua
changeset 4063 072366857d79
parent 4062 cf9a1c7d558d
child 4064 b44620cacb11
equal deleted inserted replaced
4062:cf9a1c7d558d 4063:072366857d79
   209 	return origin.send(reply);
   209 	return origin.send(reply);
   210 end);
   210 end);
   211 
   211 
   212 module:hook("muc-broadcast-message", function (event)
   212 module:hook("muc-broadcast-message", function (event)
   213 	local room, stanza = event.room, event.stanza;
   213 	local room, stanza = event.room, event.stanza;
   214 	local archive_id = stanza:get_child_text("stanza-id", "urn:xmpp:sid:0");
   214 	local archive_id = stanza:get_child("stanza-id", "urn:xmpp:sid:0");
   215 	if archive_id then
   215 	if archive_id and archive_id.attr.id then
   216 		-- Remember the id of the last message so we can compare it
   216 		-- Remember the id of the last message so we can compare it
   217 		-- to the per-user marker (managed by mod_muc_markers)
   217 		-- to the per-user marker (managed by mod_muc_markers)
   218 		update_room_activity(room.jid, archive_id);
   218 		update_room_activity(room.jid, archive_id.attr.id);
   219 		-- Notify any users that need to be notified
   219 		-- Notify any users that need to be notified
   220 		notify_interested_users(room.jid);
   220 		notify_interested_users(room.jid);
   221 	end
   221 	end
   222 end, -1);
   222 end, -1);
   223 
   223