Add option for autojoining threads when opened

This commit is contained in:
Tulir Asokan
2022-10-28 23:35:31 +03:00
parent 6be531685f
commit f268ddd132
13 changed files with 219 additions and 70 deletions

12
main.go
View File

@@ -59,9 +59,10 @@ type DiscordBridge struct {
portalsByID map[database.PortalKey]*Portal
portalsLock sync.Mutex
threadsByID map[string]*Thread
threadsByRootMXID map[id.EventID]*Thread
threadsLock sync.Mutex
threadsByID map[string]*Thread
threadsByRootMXID map[id.EventID]*Thread
threadsByCreationNoticeMXID map[id.EventID]*Thread
threadsLock sync.Mutex
guildsByMXID map[id.RoomID]*Guild
guildsByID map[string]*Guild
@@ -153,8 +154,9 @@ func main() {
portalsByMXID: make(map[id.RoomID]*Portal),
portalsByID: make(map[database.PortalKey]*Portal),
threadsByID: make(map[string]*Thread),
threadsByRootMXID: make(map[id.EventID]*Thread),
threadsByID: make(map[string]*Thread),
threadsByRootMXID: make(map[id.EventID]*Thread),
threadsByCreationNoticeMXID: make(map[id.EventID]*Thread),
guildsByID: make(map[string]*Guild),
guildsByMXID: make(map[id.RoomID]*Guild),