forked from chteufleur/go-xmpp
Add support for chatstates notification (XEP-0085)
This commit is contained in:
parent
97363908e1
commit
dacdc4ac04
|
|
@ -0,0 +1,27 @@
|
|||
package xmpp
|
||||
|
||||
import (
|
||||
"encoding/xml"
|
||||
)
|
||||
|
||||
const (
|
||||
NSChatStatesNotification = "http://jabber.org/protocol/chatstates"
|
||||
)
|
||||
|
||||
// XEP-0085: Chat States Notification
|
||||
|
||||
type Active struct {
|
||||
XMLName xml.Name `xml:"http://jabber.org/protocol/chatstates active"`
|
||||
}
|
||||
type Composing struct {
|
||||
XMLName xml.Name `xml:"http://jabber.org/protocol/chatstates composing"`
|
||||
}
|
||||
type Paused struct {
|
||||
XMLName xml.Name `xml:"http://jabber.org/protocol/chatstates paused"`
|
||||
}
|
||||
type Inactive struct {
|
||||
XMLName xml.Name `xml:"http://jabber.org/protocol/chatstates inactive"`
|
||||
}
|
||||
type Gone struct {
|
||||
XMLName xml.Name `xml:"http://jabber.org/protocol/chatstates gone"`
|
||||
}
|
||||
|
|
@ -76,7 +76,14 @@ type Message struct {
|
|||
Body string `xml:"body,omitempty"`
|
||||
Thread string `xml:"thread,omitempty"`
|
||||
Error *Error `xml:"error"`
|
||||
Confir *Confirm `xml:"confirm"`
|
||||
|
||||
Confir *Confirm `xml:"confirm"` // XEP-0070
|
||||
|
||||
Active *Active `xml:"active"` // XEP-0085
|
||||
Composing *Composing `xml:"composing"` // XEP-0085
|
||||
Paused *Paused `xml:"paused"` // XEP-0085
|
||||
Inactive *Inactive `xml:"inactive"` // XEP-0085
|
||||
Gone *Gone `xml:"gone"` // XEP-0085
|
||||
}
|
||||
|
||||
// XMPP <presence/> stanza.
|
||||
|
|
|
|||
Loading…
Reference in New Issue