Comparison

util/error.lua @ 11091:4b4b5188492f

util.error: Add special case handling of <gone> with an URI
author Kim Alvefur <zash@zash.se>
date Sat, 26 Sep 2020 18:15:27 +0200 (2020-09-26)
parent 11090:33b6fbdcec88
child 11092:bd13aa89262d
comparison
equal deleted inserted replaced
11090:33b6fbdcec88 11091:4b4b5188492f
100 100
101 return setmetatable({ 101 return setmetatable({
102 type = error_type or "cancel"; 102 type = error_type or "cancel";
103 condition = condition or "undefined-condition"; 103 condition = condition or "undefined-condition";
104 text = text; 104 text = text;
105 extra = condition == "gone" and {
106 uri = error_tag:get_child_text("gone", "urn:ietf:params:xml:ns:xmpp-stanzas");
107 } or nil;
105 108
106 context = context; 109 context = context;
107 110
108 }, error_mt); 111 }, error_mt);
109 end 112 end