util.xstanza: Remove, unused since c95b84ed366b

Tue, 23 May 2023 19:41:27 +0200

author
Kim Alvefur <zash@zash.se>
date
Tue, 23 May 2023 19:41:27 +0200
changeset 488
33c922e48b57
parent 487
fd5f48a0f122
child 489
39ed19f12dca

util.xstanza: Remove, unused since c95b84ed366b

libs/xstanza.lua file | annotate | diff | comparison | revisions
--- a/libs/xstanza.lua	Thu Mar 23 19:11:15 2023 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,27 +0,0 @@
-local stanza_mt = getmetatable(require "util.stanza".stanza());
-
-local xmlns_stanzas = "urn:ietf:params:xml:ns:xmpp-stanzas";
-
-function stanza_mt:get_error()
-	local type, condition, text;
-	
-	local error_tag = self:get_child("error");
-	if not error_tag then
-		return nil, nil;
-	end
-	type = error_tag.attr.type;
-	
-	for child in error_tag:children() do
-		if child.attr.xmlns == xmlns_stanzas then
-			if child.name == "text" then
-				text = child:get_text();
-			else
-				condition = child.name;
-			end
-			if condition and text then
-				break;
-			end
-		end
-	end
-	return type, condition, text;
-end

mercurial