changeset 1495 | 9a1b3f0d0939 |
parent 1054 | 432dc4056114 |
child 1593 | 3e4d15ae2133 |
child 2352 | 1903add39b7c |
--- 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