Files
lambda/xmpp-corrections.go
2026-08-16 20:07:53 +01:00

21 lines
606 B
Go

package main
import (
"encoding/xml"
"gosrc.io/xmpp/stanza"
)
// Implementation of XEP-0308: Last Message Correction
// XEP is supposed to only allow you to correct last message and only show corrections to the user's last message
// Unfortunately, I do not give a fuck and will let any messages be corrected
type Correction struct {
stanza.MsgExtension
XMLName xml.Name `xml:"urn:xmpp:message-correct:0 replace"`
ID string `xml:"id,attr"`
}
func init() {
stanza.TypeRegistry.MapExtension(stanza.PKTMessage, xml.Name{Space: "urn:xmpp:message-correct:0", Local: "replace"}, Correction{})
}