summaryrefslogtreecommitdiff
path: root/xmpp/routing.go
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2023-07-04 22:04:05 +0200
committerxengineering <me@xengineering.eu>2023-07-04 22:04:05 +0200
commita23ba089a4e715e68b8c8d4179290692215784a2 (patch)
treef7c13f78ff728b9e0e59045f1709907c29c55e37 /xmpp/routing.go
parented6b4e818f4090c0c707fab49093bc4c3cc3ac20 (diff)
downloadlimox-a23ba089a4e715e68b8c8d4179290692215784a2.tar
limox-a23ba089a4e715e68b8c8d4179290692215784a2.tar.zst
limox-a23ba089a4e715e68b8c8d4179290692215784a2.zip
Re-implement resource binding and presence
This was removed for refactoring.
Diffstat (limited to 'xmpp/routing.go')
-rw-r--r--xmpp/routing.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/xmpp/routing.go b/xmpp/routing.go
index a9dd8b6..5cd2040 100644
--- a/xmpp/routing.go
+++ b/xmpp/routing.go
@@ -9,6 +9,10 @@ func route(s *xml.StartElement, d *xml.Decoder, c chan<- any) {
switch (*s).Name {
case xml.Name{`http://etherx.jabber.org/streams`, `features`}:
parse(streamFeatures{}, s, d, c)
+ case xml.Name{`urn:ietf:params:xml:ns:xmpp-sasl`, `success`}:
+ parse(saslSuccess{}, s, d, c)
+ case xml.Name{`jabber:client`, `iq`}:
+ parse(iqResponse{}, s, d, c)
default:
d.Skip()
}
@@ -27,6 +31,10 @@ func handle(s *session, element any) {
switch t := element.(type) {
case streamFeatures:
handleStreamFeatures(s, t)
+ case saslSuccess:
+ handleSaslSuccess(s)
+ case iqResponse:
+ handleIqResponse(s, t)
default:
log.Printf("Unknown parsed element: %v", t)
}