# HG changeset patch # User Kim Alvefur # Date 1684863687 -7200 # Node ID 33c922e48b572471f5dc41123e7f827f80b2ecfd # Parent fd5f48a0f12269730da4cc0827c33fb8f147a55c util.xstanza: Remove, unused since c95b84ed366b diff -r fd5f48a0f122 -r 33c922e48b57 libs/xstanza.lua --- 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