aboutsummaryrefslogtreecommitdiff
path: root/xmpp/handlers.go
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp/handlers.go')
-rw-r--r--xmpp/handlers.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/xmpp/handlers.go b/xmpp/handlers.go
index 4c27b3c..088cb21 100644
--- a/xmpp/handlers.go
+++ b/xmpp/handlers.go
@@ -199,10 +199,12 @@ func HandleMessage(s xmpp.Sender, p stanza.Packet) {
if err != nil {
log.Errorf("Failed to replace id %v with %v %v", replace.Id, msg.Id, tgMessageId)
} */
- session.AddToOutbox(replace.Id, resource)
+ session.AddToEditOutbox(replace.Id, resource)
} else {
err = gateway.IdsDB.Set(session.Session.Login, bare, toID, tgMessageId, msg.Id)
- if err != nil {
+ if err == nil {
+ session.AddToOutbox(msg.Id, resource)
+ } else {
log.Errorf("Failed to save ids %v/%v %v", toID, tgMessageId, msg.Id)
}
}
@@ -458,6 +460,7 @@ func handleGetDiscoInfo(s xmpp.Sender, iq *stanza.IQ) {
_, ok := toToID(iq.To)
if ok {
disco.AddIdentity("", "account", "registered")
+ disco.AddFeatures(stanza.NSMsgChatMarkers)
} else {
disco.AddIdentity("Telegram Gateway", "gateway", "telegram")
disco.AddFeatures("jabber:iq:register")