46 lines
942 B
Go
46 lines
942 B
Go
package main
|
|
|
|
import (
|
|
"github.com/diamondburned/gotk4/pkg/gtk/v4"
|
|
"gosrc.io/xmpp/stanza"
|
|
"mellium.im/xmpp/color"
|
|
"sync"
|
|
)
|
|
|
|
type chatTab struct {
|
|
isMuc bool
|
|
msgs *gtk.ListBox
|
|
name string
|
|
current_nick string
|
|
muc_presence *stanza.Presence
|
|
}
|
|
|
|
type lambdaConfig struct {
|
|
Server string
|
|
Username string
|
|
Resource string
|
|
Password string
|
|
Insecure bool
|
|
Nick string
|
|
JoinBookmarks bool
|
|
CVD color.CVD
|
|
Identicons bool
|
|
Debug bool
|
|
ShowPresenceUpdates bool
|
|
CompactMode bool
|
|
ShowAvatarsInMemberList bool
|
|
CustomNicks map[string]string
|
|
}
|
|
|
|
type mucUnit struct {
|
|
// key: Resource
|
|
// value: last user presence
|
|
Members sync.Map
|
|
}
|
|
|
|
type userUnit struct {
|
|
// key: Resource
|
|
// value: last presence of this device
|
|
Devices sync.Map
|
|
}
|