summaryrefslogtreecommitdiff
path: root/xmpp/routing.go
diff options
context:
space:
mode:
authorxengineering <me@xengineering.eu>2023-07-05 21:26:56 +0200
committerxengineering <me@xengineering.eu>2023-07-05 21:26:56 +0200
commitd614346ae08e5384e1dca7306ba64fbdc9931d2e (patch)
tree8730a5d66eee402e2c552b904060ed7b495b07c4 /xmpp/routing.go
parent48811e7d2487ebc3db49b8af7e20f57db4ac28f4 (diff)
parent4dc3723f68c390ed05ddeff13f2378da7ebf2b8f (diff)
downloadlimox-d614346ae08e5384e1dca7306ba64fbdc9931d2e.tar
limox-d614346ae08e5384e1dca7306ba64fbdc9931d2e.tar.zst
limox-d614346ae08e5384e1dca7306ba64fbdc9931d2e.zip
Merge branch 'msg-backend'
This adds the XMPP functionality to send and receive XMPP text messages in one-to-one chats.
Diffstat (limited to 'xmpp/routing.go')
-rw-r--r--xmpp/routing.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/xmpp/routing.go b/xmpp/routing.go
index 5cd2040..2f2347a 100644
--- a/xmpp/routing.go
+++ b/xmpp/routing.go
@@ -13,6 +13,8 @@ func route(s *xml.StartElement, d *xml.Decoder, c chan<- any) {
parse(saslSuccess{}, s, d, c)
case xml.Name{`jabber:client`, `iq`}:
parse(iqResponse{}, s, d, c)
+ case xml.Name{`jabber:client`, `message`}:
+ parse(message{}, s, d, c)
default:
d.Skip()
}
@@ -35,6 +37,8 @@ func handle(s *session, element any) {
handleSaslSuccess(s)
case iqResponse:
handleIqResponse(s, t)
+ case message:
+ handleMessage(s, t)
default:
log.Printf("Unknown parsed element: %v", t)
}