diff options
author | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2023-03-04 05:41:45 +0300 |
---|---|---|
committer | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2023-03-04 05:41:45 +0300 |
commit | 6e32c62f8dac5ccc97dd0a6067965ba2689f3c86 (patch) | |
tree | 8991478d056f538ed1782bfb66e6071486b8c9bf /xmpp/gateway | |
parent | b3d66993e5962d2b961631e3afa578967a7b3d8a (diff) |
Assign IDs from Telegram to XMPP messages
Diffstat (limited to 'xmpp/gateway')
-rw-r--r-- | xmpp/gateway/gateway.go | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/xmpp/gateway/gateway.go b/xmpp/gateway/gateway.go index f4ec690..daa8f8a 100644 --- a/xmpp/gateway/gateway.go +++ b/xmpp/gateway/gateway.go @@ -27,16 +27,16 @@ var Jid *stanza.Jid var DirtySessions = false // SendMessage creates and sends a message stanza -func SendMessage(to string, from string, body string, component *xmpp.Component) { - sendMessageWrapper(to, from, body, component, "") +func SendMessage(to string, from string, body string, id string, component *xmpp.Component) { + sendMessageWrapper(to, from, body, id, component, "") } // SendMessageWithOOB creates and sends a message stanza with OOB URL -func SendMessageWithOOB(to string, from string, body string, component *xmpp.Component, oob string) { - sendMessageWrapper(to, from, body, component, oob) +func SendMessageWithOOB(to string, from string, body string, id string, component *xmpp.Component, oob string) { + sendMessageWrapper(to, from, body, id, component, oob) } -func sendMessageWrapper(to string, from string, body string, component *xmpp.Component, oob string) { +func sendMessageWrapper(to string, from string, body string, id string, component *xmpp.Component, oob string) { componentJid := Jid.Full() var logFrom string @@ -59,6 +59,7 @@ func sendMessageWrapper(to string, from string, body string, component *xmpp.Com From: messageFrom, To: to, Type: "chat", + Id: id, }, Body: body, } |