aboutsummaryrefslogtreecommitdiff
path: root/telegram/client.go
diff options
context:
space:
mode:
authorBohdan Horbeshko <bodqhrohro@gmail.com>2024-01-27 05:02:47 +0300
committerBohdan Horbeshko <bodqhrohro@gmail.com>2024-01-27 05:02:47 +0300
commite37c428c6764eff8e7b5ea286b1c7a0ba52be11a (patch)
treeff1dd7c431499e93dff99669b8df90805ea59118 /telegram/client.go
parentb9b6ba14a442f3c4394c535461bd6b1d03a7ef7b (diff)
XEP-0333 read markers for outgoing messages
Diffstat (limited to 'telegram/client.go')
-rw-r--r--telegram/client.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/telegram/client.go b/telegram/client.go
index 49fc1ef..38dff4c 100644
--- a/telegram/client.go
+++ b/telegram/client.go
@@ -34,11 +34,13 @@ type Client struct {
jid string
Session *persistence.Session
resources map[string]bool
- outbox map[string]string
content *config.TelegramContentConfig
cache *cache.Cache
online bool
+ outbox map[string]string
+ editOutbox map[string]string
+
DelayedStatuses map[int64]*DelayedStatus
DelayedStatusesLock sync.Mutex
@@ -54,6 +56,7 @@ type clientLocks struct {
chatMessageLocks map[int64]*sync.Mutex
resourcesLock sync.Mutex
outboxLock sync.Mutex
+ editOutboxLock sync.Mutex
lastMsgHashesLock sync.Mutex
authorizerReadLock sync.Mutex
@@ -109,9 +112,10 @@ func NewClient(conf config.TelegramConfig, jid string, component *xmpp.Component
jid: jid,
Session: session,
resources: make(map[string]bool),
- outbox: make(map[string]string),
content: &conf.Content,
cache: cache.NewCache(),
+ outbox: make(map[string]string),
+ editOutbox: make(map[string]string),
options: options,
DelayedStatuses: make(map[int64]*DelayedStatus),
lastMsgHashes: make(map[int64]uint64),