2026-01-30 15:56:58 +00:00
|
|
|
package main
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"github.com/diamondburned/gotk4/pkg/gtk/v4"
|
2026-03-15 09:55:26 +00:00
|
|
|
"mellium.im/xmpp/color"
|
2026-01-30 15:56:58 +00:00
|
|
|
"sync"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
type chatTab struct {
|
2026-05-09 07:33:47 +01:00
|
|
|
isMuc bool
|
|
|
|
|
msgs *gtk.ListBox
|
|
|
|
|
name string
|
|
|
|
|
current_nick string
|
2026-01-30 15:56:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type lambdaConfig struct {
|
2026-05-09 07:33:47 +01:00
|
|
|
Server string
|
|
|
|
|
Username string
|
|
|
|
|
Resource string
|
|
|
|
|
Password string
|
|
|
|
|
Insecure bool
|
|
|
|
|
Nick string
|
|
|
|
|
JoinBookmarks bool
|
|
|
|
|
CVD color.CVD
|
|
|
|
|
Identicons bool
|
|
|
|
|
Debug bool
|
2026-05-08 06:56:51 +01:00
|
|
|
ShowPresenceUpdates bool
|
2026-05-09 09:00:44 +01:00
|
|
|
CompactMode bool
|
2026-05-10 14:46:19 +01:00
|
|
|
CustomNicks map[string]string
|
2026-01-30 15:56:58 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
type mucUnit struct {
|
2026-03-15 09:57:08 +00:00
|
|
|
// key: Resource
|
2026-01-30 15:56:58 +00:00
|
|
|
// value: last user presence
|
|
|
|
|
Members sync.Map
|
|
|
|
|
}
|
2026-01-30 21:31:33 +00:00
|
|
|
|
|
|
|
|
type userUnit struct {
|
2026-01-31 15:08:54 +00:00
|
|
|
// key: Resource
|
2026-01-30 21:31:33 +00:00
|
|
|
// value: last presence of this device
|
|
|
|
|
Devices sync.Map
|
|
|
|
|
}
|