Also ack with XEP-0184 read receipts for outgoing messages

This commit is contained in:
Bohdan Horbeshko 2024-01-27 03:25:17 -05:00
parent e37c428c67
commit 81fc3ea370
2 changed files with 2 additions and 0 deletions

View file

@ -144,6 +144,7 @@ func sendMessageWrapper(to string, from string, body string, id string, componen
message.Extensions = append(message.Extensions, stanza.MarkReceived{ID: marker.Id})
} else if marker.Type == MarkerTypeDisplayed {
message.Extensions = append(message.Extensions, stanza.MarkDisplayed{ID: marker.Id})
message.Extensions = append(message.Extensions, stanza.ReceiptReceived{ID: marker.Id})
}
}
if !isCarbon && toJid.Resource != "" {

View file

@ -461,6 +461,7 @@ func handleGetDiscoInfo(s xmpp.Sender, iq *stanza.IQ) {
if ok {
disco.AddIdentity("", "account", "registered")
disco.AddFeatures(stanza.NSMsgChatMarkers)
disco.AddFeatures(stanza.NSMsgReceipts)
} else {
disco.AddIdentity("Telegram Gateway", "gateway", "telegram")
disco.AddFeatures("jabber:iq:register")