Software /
code /
prosody-modules
Diff
mod_post_msg/mod_post_msg.lua @ 321:661f64627fed
mod_post_msg: Add compatibility with usermanager in 0.7
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Thu, 27 Jan 2011 17:36:58 +0100 |
parent | 320:8d4f3cd41f82 |
child | 661:a6c8f252e5fa |
line wrap: on
line diff
--- a/mod_post_msg/mod_post_msg.lua Thu Jan 27 17:30:48 2011 +0100 +++ b/mod_post_msg/mod_post_msg.lua Thu Jan 27 17:36:58 2011 +0100 @@ -24,6 +24,14 @@ return r end; +--COMPAT 0.7 +if not test_password then + local validate_credentials = require "core.usermanager".validate_credentials; + test_password = function(user, host, password) + return validate_credentials(host, user, password) + end +end + local function http_response(code, message, extra_headers) local response = { status = code .. " " .. message;