forked from chteufleur/go-xmpp
Convenient method for creating an Iq response.
This commit is contained in:
parent
438164a9d9
commit
f9302660b0
|
|
@ -48,6 +48,12 @@ func (iq *Iq) PayloadName() (name xml.Name) {
|
||||||
return start.Name
|
return start.Name
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Create a response Iq. The Id is kept, To and From are reversed, Type is set
|
||||||
|
// to the given value.
|
||||||
|
func (iq *Iq) Response(type_ string) *Iq {
|
||||||
|
return &Iq{Id: iq.Id, Type: type_, From: iq.To, To: iq.From}
|
||||||
|
}
|
||||||
|
|
||||||
// XMPP <message/> stanza.
|
// XMPP <message/> stanza.
|
||||||
type Message struct {
|
type Message struct {
|
||||||
XMLName xml.Name `xml:"message"`
|
XMLName xml.Name `xml:"message"`
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue