add hub menagment functions
This commit is contained in:
+13
-7
@@ -108,6 +108,11 @@ type ConnectionStatusSetData struct {
|
||||
NewState ConnectionState.ConnectionState `json:"newState"`
|
||||
}
|
||||
|
||||
type ConnectionElevatePendingData struct {
|
||||
Id uuid.UUID `json:"id"`
|
||||
UserWantingToElevate uuid.UUID `json:"userWantingToElevate"`
|
||||
}
|
||||
|
||||
type Message struct {
|
||||
Id uuid.UUID `json:"id"`
|
||||
AttachedFile string `json:"attachedFile"`
|
||||
@@ -272,12 +277,12 @@ func (h *HubRole) HasPermission(r Permissions) bool {
|
||||
}
|
||||
|
||||
type HubUser struct {
|
||||
Mu sync.RWMutex `json:"mu"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
Roles HubBoundRoles `json:"-"`
|
||||
Name string `json:"name"` // Name empty = original name
|
||||
OriginalId uuid.UUID `json:"originalId"`
|
||||
IsMuted bool `json:"isMuted"`
|
||||
Mu sync.RWMutex `json:"mu"`
|
||||
CreatedAt time.Time `json:"createdAt"`
|
||||
Roles HubBoundRoles `json:"-"`
|
||||
Name string `json:"name"` // Name empty = original name
|
||||
OriginalId uuid.UUID `json:"originalId"`
|
||||
IsGlobalMuted bool `json:"isGlobalMuted"`
|
||||
}
|
||||
|
||||
func NewHubUser() *HubUser {
|
||||
@@ -290,7 +295,8 @@ type HubGroup struct {
|
||||
Color Rgba `json:"color"`
|
||||
RolesCanView HubBoundRoles `json:"rolesCanView"`
|
||||
UsersCachedPermissions map[uuid.UUID]CachedUserPermissions `json:"-"`
|
||||
Channels map[uuid.UUID]*HubChannel `json:"channels"`
|
||||
Channels map[uuid.UUID]*HubChannel `json:"-"`
|
||||
MutedUsers map[uuid.UUID]struct{} `json:"-"`
|
||||
Id uint8 `json:"id"` // Id 0 for unused
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user