mirror of
https://github.com/Unkn0wnCat/matrix-veles.git
synced 2025-07-21 10:27:16 +02:00
Add switch for enable/disable room
This commit is contained in:
parent
ddefe682fa
commit
d89a85dfb4
17 changed files with 554 additions and 8 deletions
|
@ -5,6 +5,7 @@ import "github.com/Unkn0wnCat/matrix-veles/internal/config"
|
|||
type Room struct {
|
||||
ID string `json:"id"`
|
||||
Active bool `json:"active"`
|
||||
Deactivated bool `json:"deactivated"`
|
||||
Name string `json:"name"`
|
||||
RoomID string `json:"roomId"`
|
||||
Debug bool `json:"debug"`
|
||||
|
@ -28,7 +29,8 @@ func MakeRoom(room *config.RoomConfig) *Room {
|
|||
return &Room{
|
||||
ID: room.ID.Hex(),
|
||||
Name: room.Name,
|
||||
Active: room.Active,
|
||||
Active: room.Active && !room.Deactivate,
|
||||
Deactivated: room.Deactivate,
|
||||
RoomID: room.RoomID,
|
||||
Debug: room.Debug,
|
||||
AdminPowerLevel: room.AdminPowerLevel,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue