This commit is contained in:
2026-03-05 22:41:16 +02:00
parent e879703041
commit 61417dbf92
6 changed files with 196 additions and 7 deletions

View File

@@ -54,6 +54,11 @@ type RoundState struct {
Revealed bool `json:"revealed"`
}
type ActivityLogEntry struct {
At time.Time `json:"at"`
Message string `json:"message"`
}
type persistedRoom struct {
ID string `json:"id"`
AdminToken string `json:"adminToken"`
@@ -62,6 +67,7 @@ type persistedRoom struct {
Settings RoomSettings `json:"settings"`
Round RoundState `json:"round"`
Participants []*Participant `json:"participants"`
ActivityLog []ActivityLogEntry `json:"activityLog,omitempty"`
}
type subscriber struct {
@@ -77,6 +83,7 @@ type Room struct {
Settings RoomSettings
Round RoundState
Participants map[string]*Participant
ActivityLog []ActivityLogEntry
mu sync.RWMutex
subscribers map[string]*subscriber
@@ -133,6 +140,11 @@ type RoomLinks struct {
AdminLink string `json:"adminLink,omitempty"`
}
type PublicActivityLogEntry struct {
At time.Time `json:"at"`
Message string `json:"message"`
}
type PublicRoomState struct {
RoomID string `json:"roomId"`
RoomName string `json:"roomName"`
@@ -148,4 +160,5 @@ type PublicRoomState struct {
SelfParticipantID string `json:"selfParticipantId"`
ViewerIsAdmin bool `json:"viewerIsAdmin"`
Links RoomLinks `json:"links"`
AdminLogs []PublicActivityLogEntry `json:"adminLogs,omitempty"`
}