refactor: sync sparse tlprofile runtime

This commit is contained in:
A 2026-07-16 21:36:32 +08:00
parent 5ecf4e912d
commit 25ab04a254
93 changed files with 2983 additions and 1615 deletions

View file

@ -5,8 +5,7 @@ import (
"errors"
"fmt"
"github.com/iamxvbaba/td/tg"
"github.com/iamxvbaba/td/tlprofile"
"telesrv/internal/store"
)
@ -142,7 +141,7 @@ func (r *Router) cacheResolvedDurableSessionLayer(
return nil
}
key := clientInfoSessionKey{rawAuthKeyID: rawAuthKeyID, sessionID: sessionID}
profile, supported := tg.ResolveLayerProfile(value.Layer)
profile, supported := tlprofile.ResolveProfile(value.Layer)
if !supported || int(profile) != value.Layer {
// A newer binary may have persisted a future profile. Never leave an old
// typed codec shadow beside that raw authoritative watermark. Observation