mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-22 17:30:26 +00:00
Update vendor matterbridge/go-xmpp
This commit is contained in:
parent
6576409d60
commit
fd04e08c9c
20
vendor/github.com/matterbridge/go-xmpp/xmpp.go
generated
vendored
20
vendor/github.com/matterbridge/go-xmpp/xmpp.go
generated
vendored
@ -575,6 +575,8 @@ type Chat struct {
|
|||||||
Thread string
|
Thread string
|
||||||
Ooburl string
|
Ooburl string
|
||||||
Oobdesc string
|
Oobdesc string
|
||||||
|
ID string
|
||||||
|
ReplaceID string
|
||||||
Roster Roster
|
Roster Roster
|
||||||
Other []string
|
Other []string
|
||||||
OtherElem []XMLElement
|
OtherElem []XMLElement
|
||||||
@ -626,6 +628,8 @@ func (c *Client) Recv() (stanza interface{}, err error) {
|
|||||||
Text: v.Body,
|
Text: v.Body,
|
||||||
Subject: v.Subject,
|
Subject: v.Subject,
|
||||||
Thread: v.Thread,
|
Thread: v.Thread,
|
||||||
|
ID: v.ID,
|
||||||
|
ReplaceID: v.ReplaceID.ID,
|
||||||
Other: v.OtherStrings(),
|
Other: v.OtherStrings(),
|
||||||
OtherElem: v.Other,
|
OtherElem: v.Other,
|
||||||
Stamp: stamp,
|
Stamp: stamp,
|
||||||
@ -657,6 +661,8 @@ func (c *Client) Send(chat Chat) (n int, err error) {
|
|||||||
var subtext = ``
|
var subtext = ``
|
||||||
var thdtext = ``
|
var thdtext = ``
|
||||||
var oobtext = ``
|
var oobtext = ``
|
||||||
|
var msgidtext = ``
|
||||||
|
var msgcorrecttext = ``
|
||||||
if chat.Subject != `` {
|
if chat.Subject != `` {
|
||||||
subtext = `<subject>` + xmlEscape(chat.Subject) + `</subject>`
|
subtext = `<subject>` + xmlEscape(chat.Subject) + `</subject>`
|
||||||
}
|
}
|
||||||
@ -670,7 +676,13 @@ func (c *Client) Send(chat Chat) (n int, err error) {
|
|||||||
}
|
}
|
||||||
oobtext += `</x>`
|
oobtext += `</x>`
|
||||||
}
|
}
|
||||||
return fmt.Fprintf(c.conn, "<message to='%s' type='%s' xml:lang='en'>" + subtext + "<body>%s</body>" + oobtext + thdtext + "</message>",
|
if chat.ID != `` {
|
||||||
|
msgidtext = `id='` + xmlEscape(chat.ID) + `'`
|
||||||
|
}
|
||||||
|
if chat.ReplaceID != `` {
|
||||||
|
msgcorrecttext = `<replace id='` + xmlEscape(chat.ReplaceID) + `' xmlns='urn:xmpp:message-correct:0'/>`
|
||||||
|
}
|
||||||
|
return fmt.Fprintf(c.conn, "<message to='%s' type='%s' " + msgidtext + " xml:lang='en'>" + subtext + "<body>%s</body>" + msgcorrecttext + oobtext + thdtext + "</message>",
|
||||||
xmlEscape(chat.Remote), xmlEscape(chat.Type), xmlEscape(chat.Text))
|
xmlEscape(chat.Remote), xmlEscape(chat.Type), xmlEscape(chat.Text))
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -787,6 +799,11 @@ type bindBind struct {
|
|||||||
Jid string `xml:"jid"`
|
Jid string `xml:"jid"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type clientMessageCorrect struct {
|
||||||
|
XMLName xml.Name `xml:"urn:xmpp:message-correct:0 replace"`
|
||||||
|
ID string `xml:"id,attr"`
|
||||||
|
}
|
||||||
|
|
||||||
// RFC 3921 B.1 jabber:client
|
// RFC 3921 B.1 jabber:client
|
||||||
type clientMessage struct {
|
type clientMessage struct {
|
||||||
XMLName xml.Name `xml:"jabber:client message"`
|
XMLName xml.Name `xml:"jabber:client message"`
|
||||||
@ -799,6 +816,7 @@ type clientMessage struct {
|
|||||||
Subject string `xml:"subject"`
|
Subject string `xml:"subject"`
|
||||||
Body string `xml:"body"`
|
Body string `xml:"body"`
|
||||||
Thread string `xml:"thread"`
|
Thread string `xml:"thread"`
|
||||||
|
ReplaceID clientMessageCorrect
|
||||||
|
|
||||||
// Any hasn't matched element
|
// Any hasn't matched element
|
||||||
Other []XMLElement `xml:",any"`
|
Other []XMLElement `xml:",any"`
|
||||||
|
2
vendor/manifest
vendored
2
vendor/manifest
vendored
@ -402,7 +402,7 @@
|
|||||||
"importpath": "github.com/matterbridge/go-xmpp",
|
"importpath": "github.com/matterbridge/go-xmpp",
|
||||||
"repository": "https://github.com/matterbridge/go-xmpp",
|
"repository": "https://github.com/matterbridge/go-xmpp",
|
||||||
"vcs": "git",
|
"vcs": "git",
|
||||||
"revision": "3cceb718219057817b66c4bb55673f5f417c0bff",
|
"revision": "cd19799fba91790ac733655c546bce2107e5b838",
|
||||||
"branch": "work",
|
"branch": "work",
|
||||||
"notests": true
|
"notests": true
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user