aboutsummaryrefslogtreecommitdiff
path: root/xmpp/gateway
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2023-06-03 07:20:03 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2023-06-03 07:20:03 +0300
commit9a84e9a8b6b7a6f953301e54f19cdf4be73592e1 (patch)
tree33e96558211827f696868815222e2d36abbd8fcb /xmpp/gateway
parent8663a29e157aae6e68cc880a86b3a666da37bfc9 (diff)
Store message ids in Badger DB
Diffstat (limited to 'xmpp/gateway')
-rw-r--r--xmpp/gateway/gateway.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/xmpp/gateway/gateway.go b/xmpp/gateway/gateway.go
index 534ee7e..29c8a07 100644
--- a/xmpp/gateway/gateway.go
+++ b/xmpp/gateway/gateway.go
@@ -6,6 +6,7 @@ import (
"strings"
"sync"
+ "dev.narayana.im/narayana/telegabber/badger"
"dev.narayana.im/narayana/telegabber/xmpp/extensions"
log "github.com/sirupsen/logrus"
@@ -30,6 +31,9 @@ var QueueLock = sync.Mutex{}
// Jid stores the component's JID object
var Jid *stanza.Jid
+// IdsDB provides a disk-backed bidirectional dictionary of Telegram and XMPP ids
+var IdsDB badger.IdsDB
+
// DirtySessions denotes that some Telegram session configurations
// were changed and need to be re-flushed to the YamlDB
var DirtySessions = false