mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2025-10-27 14:55:34 -07:00
PubSub protocol support (#142)
* PubSub protocol support Added support for : - XEP-0050 (Command)) - XEP-0060 (PubSub) - XEP-0004 (Forms) Fixed the NewClient function by adding parsing of the domain from the JID if no domain is provided in transport config. Updated xmpp_jukebox example * Delete useless pubsub errors * README.md update Fixed import in echo example * Typo * Fixed raw send on client example * Fixed jukebox example and added a README.md
This commit is contained in:
committed by
Jérôme Sautret
parent
6e2ba9ca57
commit
947fcf0432
@@ -171,7 +171,7 @@ func handleDelegation(s xmpp.Sender, p stanza.Packet) {
|
||||
return
|
||||
}
|
||||
|
||||
pubsub, ok := forwardedIQ.Payload.(*stanza.PubSub)
|
||||
pubsub, ok := forwardedIQ.Payload.(*stanza.PubSubGeneric)
|
||||
if !ok {
|
||||
// We only support pubsub delegation
|
||||
return
|
||||
@@ -180,7 +180,7 @@ func handleDelegation(s xmpp.Sender, p stanza.Packet) {
|
||||
if pubsub.Publish.XMLName.Local == "publish" {
|
||||
// Prepare pubsub IQ reply
|
||||
iqResp := stanza.NewIQ(stanza.Attrs{Type: "result", From: forwardedIQ.To, To: forwardedIQ.From, Id: forwardedIQ.Id})
|
||||
payload := stanza.PubSub{
|
||||
payload := stanza.PubSubGeneric{
|
||||
XMLName: xml.Name{
|
||||
Space: "http://jabber.org/protocol/pubsub",
|
||||
Local: "pubsub",
|
||||
|
||||
Reference in New Issue
Block a user