extends Node class_name Stanza const disco_info_queury := "" const disco_items_queury := "" static func yield_as_is(): return yield() static func unwrap_query_result(iq: Xml.XmlElement) -> Sums.Result: if iq == null or iq.name != "iq" or not "type" in iq.attributes: return Sums.Result.make_error(ERR_INVALID_DATA) # todo: Delegate strctured XMPP error. if iq.attributes["type"] != "result": return Sums.Result.make_error(ERR_INVALID_DATA) for child in iq.children: if child.is_element() and child.name == "query": return Sums.Result.make_value(child) return Sums.Result.make_error(ERR_INVALID_DATA)