mirror of
https://github.com/FluuxIO/go-xmpp.git
synced 2024-11-24 11:32:00 -08:00
Add support for chat markers parsing (XEP-0333)
This commit is contained in:
parent
7a4364be95
commit
67eaed98b6
24
msg_chat_markers.go
Normal file
24
msg_chat_markers.go
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
package xmpp
|
||||||
|
|
||||||
|
import "encoding/xml"
|
||||||
|
|
||||||
|
/*
|
||||||
|
Support for:
|
||||||
|
- XEP-0333 - Chat Markers: https://xmpp.org/extensions/xep-0333.html
|
||||||
|
*/
|
||||||
|
|
||||||
|
type Markable struct {
|
||||||
|
MsgExtension
|
||||||
|
XMLName xml.Name `xml:"urn:xmpp:chat-markers:0 markable"`
|
||||||
|
}
|
||||||
|
|
||||||
|
type MarkReceived struct {
|
||||||
|
MsgExtension
|
||||||
|
XMLName xml.Name `xml:"urn:xmpp:chat-markers:0 received"`
|
||||||
|
ID string
|
||||||
|
}
|
||||||
|
|
||||||
|
func init() {
|
||||||
|
typeRegistry.MapExtension(PKTMessage, xml.Name{"urn:xmpp:chat-markers:0", "markable"}, Markable{})
|
||||||
|
typeRegistry.MapExtension(PKTMessage, xml.Name{"urn:xmpp:chat-markers:0", "received"}, MarkReceived{})
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user