add per channel/group for user cahcing

This commit is contained in:
2026-04-26 17:44:31 +02:00
parent 9c73a01101
commit 472b4ea703
2 changed files with 55 additions and 32 deletions
+2 -1
View File
@@ -53,7 +53,7 @@ func HandleHubCreate(response http.ResponseWriter, request *http.Request) {
creator.Roles.Add(rootRole.Id)
memberRole := &types.HubRole{
Id: types.BoundRolesMax,
Id: types.HubBoundRolesMax,
Name: "member",
Color: types.Rgba{}.GetRandom(),
CreatedAt: hub.CreatedAt,
@@ -83,6 +83,7 @@ func HandleHubCreate(response http.ResponseWriter, request *http.Request) {
channel.RolesCanView.Add(memberRole.Id)
channel.RolesCanReadHistory.Add(rootGroup.Id)
channel.RolesCanReadHistory.Add(memberRole.Id)
channel.UsersCanView.Add()
hub.Channels[channel.Id] = channel
}