summaryrefslogtreecommitdiff
path: root/xmpp/stream_pair.go
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2023-06-30 11:58:21 +0200
committerxengineering <me@xengineering.eu>2023-06-30 11:58:21 +0200
commit04746f75ea935266ded4e28edb6ab25c537d50e1 (patch)
treed13dcd9d9190b008385912d86918fb70f08f83ad /xmpp/stream_pair.go
parentc8544b19df055235b9106ff296f0a5fe7cb1fe91 (diff)
parent91766058d76044fa7e07f75c586bc7f89b868328 (diff)
downloadlimox-04746f75ea935266ded4e28edb6ab25c537d50e1.tar
limox-04746f75ea935266ded4e28edb6ab25c537d50e1.tar.zst
limox-04746f75ea935266ded4e28edb6ab25c537d50e1.zip
Merge branch 'routing'
This adds an XML element router and a corresponding unit test. The element router will be used to register XML element handler with a single line.
Diffstat (limited to 'xmpp/stream_pair.go')
-rw-r--r--xmpp/stream_pair.go8
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())
}
}
}