Repository navigation
feat(protocol): project historical bot web widgets to messageMediaUnsupported - #6
Merged
Merged
Conversation
…upported A Layer 233 messageMediaWidget has no wire identity before Layer 233. The generic new-only policy dropped the media, so a widget-only message reached a 225-232 client as an empty text message. Project it to messageMediaUnsupported#9f84f49e instead, so the older client renders an explicit unsupported-media placeholder. - gen/layer_real_policy_test.go: resolve the messageMediaWidget new-only obligation for 225-232 with LayerResolveProject + hook layerProjectLegacyWidgetMedia (was the default drop). policy.json grows from 305 to 313 entries (eight layers). - tlprofile/adapters.go: layerProjectLegacyWidgetMediaProject returns the widget unchanged for 233 and MessageMediaUnsupported for older profiles. - gen/layer_codec_model.go: a family project hook is applied by the class/object dispatcher before the family body is encoded, so the family body must not re-enter a generic object encoder (which would need runtime dynamic dispatch, forbidden by the sparse codec). Emit the drop behavior in the family body and keep the hook only in the project function. This is the first family-level project hook, so the previous emit referenced an object encoder the sparse model never generated. - Regenerate the tlprofile sidecar (families/runtime) and add a projection test. - Docs: README + LAYER233_REVIEW record the projection and the 313-entry policy.
go generate ./... was not re-run when the Layer 232/233 constructors landed, so the entity/styling/typing builders and the cached query wrappers were stale (missing messageEntityTonAddress, the draft can_stop/keep_on_stop fields, sendMessageStopDraft and the widget/welcome cached queries). Regenerate them so make generate is clean.
roon9e
added a commit
to roon9e/gramsrv
that referenced
this pull request
Nov 7, 2026
v1.9.0 carries the Layer 233 historical widget projection (PR iamxvbaba/td#6): messageMediaWidget now encodes to messageMediaUnsupported for exact profiles 225-232. The layer-225-232 projection test is green against it.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A Layer 233 messageMediaWidget has no wire identity before Layer 233. The generic new-only policy dropped the media, so a widget-only message reached a 225-232 client as an empty text message. Project it to messageMediaUnsupported#9f84f49e instead.
This is a follow-up to #5 (Layer 233). The sparse codec previously had no family-level project hook, so the generator emitted a call to a generic object encoder it never generated; the family body now keeps the drop behavior and only the project function calls the typed hook (the class/object dispatcher applies it before dispatch).