diff options
author | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2023-09-19 11:23:39 +0300 |
---|---|---|
committer | Bohdan Horbeshko <bodqhrohro@gmail.com> | 2023-09-19 11:23:39 +0300 |
commit | e77caf2c42c079062ade31f928a40b7654ac9bfd (patch) | |
tree | 81893edc63a503e277778370f5aa5509ef86eed4 /telegram/client.go | |
parent | c1887e5a1ed80fd06795a1017c821375562ff70b (diff) |
Send recent history on MUC join
Diffstat (limited to 'telegram/client.go')
-rw-r--r-- | telegram/client.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/telegram/client.go b/telegram/client.go index 6f6d719..6033c7c 100644 --- a/telegram/client.go +++ b/telegram/client.go @@ -64,6 +64,8 @@ type Client struct { lastMsgHashes map[int64]uint64 msgHashSeed maphash.Seed + mucResources map[int64]map[string]bool + locks clientLocks SendMessageLock sync.Mutex } @@ -73,6 +75,7 @@ type clientLocks struct { chatMessageLocks map[int64]*sync.Mutex resourcesLock sync.Mutex outboxLock sync.Mutex + mucResourcesLock sync.Mutex lastMsgHashesLock sync.Mutex authorizerReadLock sync.Mutex @@ -133,6 +136,7 @@ func NewClient(conf config.TelegramConfig, jid string, component *xmpp.Component Session: session, resources: make(map[string]bool), outbox: make(map[string]string), + mucResources: make(map[int64]map[string]bool), content: &conf.Content, cache: cache.NewCache(), options: options, |