Software /
code /
verse
Changeset
488:33c922e48b57
util.xstanza: Remove, unused since c95b84ed366b
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 23 May 2023 19:41:27 +0200 |
parents | 487:fd5f48a0f122 |
children | 489:39ed19f12dca |
files | libs/xstanza.lua |
diffstat | 1 files changed, 0 insertions(+), 27 deletions(-) [+] |
line wrap: on
line diff
--- 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