Software /
code /
prosody-modules
Comparison
mod_rest/mod_rest.lua @ 5334:3c51eab0afe8
mod_rest: Get correct type from config
Autocomplete?
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 08 Apr 2023 19:51:24 +0200 |
parent | 5332:e0b5468aae49 |
child | 5557:d7667d9ad96a |
comparison
equal
deleted
inserted
replaced
5333:10fcfa7e62a1 | 5334:3c51eab0afe8 |
---|---|
389 end | 389 end |
390 module:hook(archive_event_name, archive_handler, 1); | 390 module:hook(archive_event_name, archive_handler, 1); |
391 end | 391 end |
392 | 392 |
393 local iq_timeout = tonumber(request.headers.prosody_rest_timeout) or module:get_option_number("rest_iq_timeout", 60*2); | 393 local iq_timeout = tonumber(request.headers.prosody_rest_timeout) or module:get_option_number("rest_iq_timeout", 60*2); |
394 iq_timeout = math.min(iq_timeout, module:get_option_boolean("rest_iq_max_timeout", 300)); | 394 iq_timeout = math.min(iq_timeout, module:get_option_number("rest_iq_max_timeout", 300)); |
395 | 395 |
396 local p = module:send_iq(payload, origin, iq_timeout):next( | 396 local p = module:send_iq(payload, origin, iq_timeout):next( |
397 function (result) | 397 function (result) |
398 module:log("debug", "Sending[rest]: %s", result.stanza:top_tag()); | 398 module:log("debug", "Sending[rest]: %s", result.stanza:top_tag()); |
399 response.headers.content_type = send_type; | 399 response.headers.content_type = send_type; |