rebuilt sidebox code tighter

This commit is contained in:
2026-02-16 14:02:49 -07:00
parent 08b0fa6185
commit e1d2b60b2b
8 changed files with 243 additions and 310 deletions
+7
View File
@@ -22,6 +22,13 @@ type Sidebox struct {
Param *string `db:"param"`
}
// Known sidebox IDs.
const (
SideboxIDCommunities = int32(1)
SideboxIDConferences = int32(2)
SideboxIDOnlineUsers = int32(3)
)
// copySideboxes copies sideboxes from one user to another.
func copySideboxes(ctx context.Context, tx *sqlx.Tx, toUid int32, fromUid int32) error {
sbox := make([]Sidebox, 0, 3)