From c224e6ebc23d96929d9c3fee9b7987762f68f1dd Mon Sep 17 00:00:00 2001 From: xengineering Date: Fri, 30 Jun 2023 11:56:59 +0200 Subject: Add xmpp/router.go This implements a routing function for XML elements received by an XML stream. --- xmpp/stream_pair.go | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'xmpp/stream_pair.go') diff --git a/xmpp/stream_pair.go b/xmpp/stream_pair.go index b13d8a3..c9108d1 100644 --- a/xmpp/stream_pair.go +++ b/xmpp/stream_pair.go @@ -28,13 +28,7 @@ func runStreamPair(s *session) { } if buf.isComplete() { element := buf.reset() - // TODO handle XML element here - this is just a dummy: - switch start := element[0].(type) { - case xml.StartElement: - log.Printf("Got XML element `%s`\n", start.Name.Local) - default: - log.Println("No xml.StartElement at start of element buffer!") - } + route(element, getRoutingTable()) } } } -- cgit v1.2.3-70-g09d2