From 9a84e9a8b6b7a6f953301e54f19cdf4be73592e1 Mon Sep 17 00:00:00 2001 From: Bohdan Horbeshko Date: Sat, 3 Jun 2023 00:20:03 -0400 Subject: Store message ids in Badger DB --- xmpp/gateway/gateway.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'xmpp/gateway') 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 -- cgit v1.2.3