Diff

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
parent 11090:33b6fbdcec88
child 11092:bd13aa89262d
line wrap: on
line diff
--- a/util/error.lua	Sat Sep 26 18:14:10 2020 +0200
+++ b/util/error.lua	Sat Sep 26 18:15:27 2020 +0200
@@ -102,6 +102,9 @@
 		type = error_type or "cancel";
 		condition = condition or "undefined-condition";
 		text = text;
+		extra = condition == "gone" and {
+			uri = error_tag:get_child_text("gone", "urn:ietf:params:xml:ns:xmpp-stanzas");
+		} or nil;
 
 		context = context;