mod_lastlog/mod_lastlog.lua
changeset 1175 9eac4e2386d2
parent 1174 bd7901fef71b
child 1176 06e0c279f6a8
equal deleted inserted replaced
1174:bd7901fef71b 1175:9eac4e2386d2
    36 end);
    36 end);
    37 
    37 
    38 
    38 
    39 if module:get_host_type() == "component" then
    39 if module:get_host_type() == "component" then
    40 	module:hook("message/bare", function(event)
    40 	module:hook("message/bare", function(event)
    41 		local room = split_jid(event.stanza.attr.to);
    41 		local room = jid.split(event.stanza.attr.to);
    42 		if room then
    42 		if room then
    43 			datamanager.store(room, module.host, "lastlog", {
    43 			datamanager.store(room, module.host, "lastlog", {
    44 				event = "message";
    44 				event = "message";
    45 				timestamp = time(),
    45 				timestamp = time(),
    46 			});
    46 			});