This commit is contained in:
2026-10-18 05:28:57 +07:00
parent bfd6841d7d
commit e96199afba
18 changed files with 2331 additions and 1193 deletions
+8 -2
View File
@@ -73,8 +73,9 @@ func (s *ScreenService) SetCommand(ctx context.Context, gameID int, command int3
}
// Bind attaches a screen session to a game.
func (s *ScreenService) Bind(ctx context.Context, id, gameID int, tokenHash string) error {
return mapError(s.repo.Bind(ctx, id, gameID, tokenHash))
func (s *ScreenService) Bind(ctx context.Context, id, gameID int, tokenHash string, initializeAudio bool) (bool, error) {
isNewBinding, err := s.repo.BindWithAudio(ctx, id, gameID, tokenHash, initializeAudio)
return isNewBinding, mapError(err)
}
// Unbind detaches a screen session from its game.
@@ -93,3 +94,8 @@ func mapError(err error) error {
}
return err
}
// InitializeScreen joins the current display without resetting other screens.
func (s *ScreenService) InitializeScreen(ctx context.Context, id, gameID int, mode int32, text, label string, duration int64) error {
return s.repo.InitializeScreen(ctx, id, gameID, mode, text, label, duration)
}