diff options
author | xengineering <me@xengineering.eu> | 2023-06-30 11:56:59 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2023-06-30 11:56:59 +0200 |
commit | c224e6ebc23d96929d9c3fee9b7987762f68f1dd (patch) | |
tree | 7f3946d8384cf5622c4fb8b24e6b9d90fce6dc5b /xmpp/stream_pair.go | |
parent | c8544b19df055235b9106ff296f0a5fe7cb1fe91 (diff) | |
download | limox-c224e6ebc23d96929d9c3fee9b7987762f68f1dd.tar limox-c224e6ebc23d96929d9c3fee9b7987762f68f1dd.tar.zst limox-c224e6ebc23d96929d9c3fee9b7987762f68f1dd.zip |
Add xmpp/router.go
This implements a routing function for XML elements received by an XML
stream.
Diffstat (limited to 'xmpp/stream_pair.go')
-rw-r--r-- | xmpp/stream_pair.go | 8 |
1 files changed, 1 insertions, 7 deletions
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()) } } } |