diff options
author | xengineering <me@xengineering.eu> | 2023-06-30 19:58:48 +0200 |
---|---|---|
committer | xengineering <me@xengineering.eu> | 2023-06-30 19:58:48 +0200 |
commit | 512a217cca62563a1ed0e577289e21ed2203b37b (patch) | |
tree | 88a299f8da9695e9336dc4d88d89a0fa25d91c0b | |
parent | 62a17dd6584009cad58fceee6b1ada74edf1d38f (diff) | |
download | limox-512a217cca62563a1ed0e577289e21ed2203b37b.tar limox-512a217cca62563a1ed0e577289e21ed2203b37b.tar.zst limox-512a217cca62563a1ed0e577289e21ed2203b37b.zip |
Add log-only handler for received IQ stanzas
This handler is just a placeholder for a more extensive IQ handling but
already writes to the log so that it is obvious what is happening.
-rw-r--r-- | xmpp/router.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xmpp/router.go b/xmpp/router.go index 9d69033..1d9c3e5 100644 --- a/xmpp/router.go +++ b/xmpp/router.go @@ -25,9 +25,17 @@ func getRoutingTable() routingTable { {xml.Name{`http://etherx.jabber.org/streams`, `features`}, streamFeaturesHandler}, {xml.Name{`urn:ietf:params:xml:ns:xmpp-sasl`, `success`}, saslSuccessHandler}, {xml.Name{`urn:ietf:params:xml:ns:xmpp-sasl`, `failure`}, saslFailureHandler}, + {xml.Name{`jabber:client`, `iq`}, voidIq}, } } +// voidIq just logs that an IQ element was received. In the current state of +// the software there is no further processing. +// TODO process IQs for error handling and further information processing. +func voidIq(s *session, e []xml.Token) { + log.Println("Received IQ element") +} + // route determines the correct handler function for the given XML element by a // given routingTable. In addition it executes the determined handler function. // If no handler function is found an error message is send via the log module. |