# HG changeset patch # User Vadim Misbakh-Soloviov # Date 1408985930 -25200 # Node ID 9a1b3f0d093980837d851e9a65335dcdbc87498a # Parent 02cd4a081db44e4bbae8ced0d7ce4918064da9c4 mod_webpresence: fixed render-type handling (thanks to biszkopcik and Zash) diff -r 02cd4a081db4 -r 9a1b3f0d0939 mod_webpresence/mod_webpresence.lua --- a/mod_webpresence/mod_webpresence.lua Mon Aug 25 12:03:52 2014 +0100 +++ b/mod_webpresence/mod_webpresence.lua Mon Aug 25 23:58:50 2014 +0700 @@ -47,7 +47,6 @@ end end status = status or "offline"; - if type == "" then type = "image" end; statuses[status].image = function() return { status_code = 200, headers = { content_type = "image/png" }, @@ -103,6 +102,11 @@ ) }; end + + if ((type == "") or (not statuses[status][type])) then + type = "image" + end; + return statuses[status][type](); end