# HG changeset patch # User Waqas Hussain # Date 1350081086 -18000 # Node ID 1c9a3454eb438466f3df9dc93102652a5309feda # Parent 5ddc43ce899311d1508c2237f90fdad77681bd3b mod_webpresence: Don't calculate the same hash four times. diff -r 5ddc43ce8993 -r 1c9a3454eb43 mod_webpresence/mod_webpresence.lua --- a/mod_webpresence/mod_webpresence.lua Sat Oct 13 02:33:06 2012 +0500 +++ b/mod_webpresence/mod_webpresence.lua Sat Oct 13 03:31:26 2012 +0500 @@ -56,14 +56,15 @@ statuses[status].image = { status_code = 200, headers = { content_type = "image/png" }, body = require_resource("status_"..status..".png") }; elseif type == "html" then + local jid_hash = sha1(jid, true); statuses[status].html = { status_code = 200, headers = { content_type = "text/html" }, - body = [[
]].. - [[]].. + [[]].. - [[]]..status..[[]].. - (message and [[]]..message..[[]] or "").. [[
]] }; elseif type == "text" then