Software /
code /
prosody
Diff
core/moduleapi.lua @ 9750:65432dc80d90
core.moduleapi: Use convenience function for creating error object from stanza
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sun, 30 Dec 2018 20:35:20 +0100 |
parent | 9748:99199b53019f |
child | 9866:09cc8c856e5e |
line wrap: on
line diff
--- a/core/moduleapi.lua Sun Dec 30 20:30:59 2018 +0100 +++ b/core/moduleapi.lua Sun Dec 30 20:35:20 2018 +0100 @@ -397,9 +397,7 @@ local function error_handler(event) if event.stanza.attr.from == stanza.attr.to then - local error_type, condition, text = event.stanza:get_error(); - local err = errutil.new({ type = error_type, condition = condition, text = text }, event); - reject(err); + reject(errutil.from_stanza(event.stanza), event); return true; end end