Software /
code /
prosody
Comparison
util/error.lua @ 11081:0b68697450c5
util.error: Add well-known field 'extra'
A place for various extra fields and edge cases of the stanza error data
model, e.g. the URI field of <gone>
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 26 Sep 2020 17:16:34 +0200 |
parent | 11080:ba77c142c9b1 |
child | 11089:35d2260644d9 |
comparison
equal
deleted
inserted
replaced
11080:ba77c142c9b1 | 11081:0b68697450c5 |
---|---|
41 template = { | 41 template = { |
42 code = e.code; | 42 code = e.code; |
43 type = e.type; | 43 type = e.type; |
44 condition = e.condition; | 44 condition = e.condition; |
45 text = e.text; | 45 text = e.text; |
46 extra = e.extra; | |
46 }; | 47 }; |
47 else | 48 else |
48 template = {}; | 49 template = {}; |
49 end | 50 end |
50 end | 51 end |
59 | 60 |
60 type = template.type or "cancel"; | 61 type = template.type or "cancel"; |
61 condition = template.condition or "undefined-condition"; | 62 condition = template.condition or "undefined-condition"; |
62 text = template.text; | 63 text = template.text; |
63 code = template.code; | 64 code = template.code; |
65 extra = template.extra; | |
64 | 66 |
65 context = context; | 67 context = context; |
66 source = source; | 68 source = source; |
67 }, error_mt); | 69 }, error_mt); |
68 | 70 |