You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Filing this issue to remember when I fight against the API shapes in GMSL.
lenientByteLimitRoomVersions is awful because you can't just copy/paste a room version impl, but need to also update this map. Remove it. It's used in the global function CheckFields(input PDU), which should really be a room version specific function. We should also move ALL validation there instead of the hodge podge we have currently. GMSL calls CheckFields when:
it makes an event via the builder
in newEventFromUntrustedJSON.
The fact the event structs are internal is frustrating from an expansion point of view. That being said, it's useful to be able to tweak the impl knowing people are just interacting with PDU interfaces. Can we get the best of both worlds somehow?
s/eventversion.go/room_versions.go/g given events don't have versions..
EventBuilder is pretty horrible, as the set of keys is fixed so doesn't allow adjustments with different room versions (and the IRoomVersion interface returns concrete EventBuilders.
Make/Send invite/join/leave should all be room version specific, given they involve creating events which may have different forms.
StateNeeded and auth rules are technically room version specific.
Filing this issue to remember when I fight against the API shapes in GMSL.
lenientByteLimitRoomVersionsis awful because you can't just copy/paste a room version impl, but need to also update this map. Remove it. It's used in the global functionCheckFields(input PDU), which should really be a room version specific function. We should also move ALL validation there instead of the hodge podge we have currently. GMSL callsCheckFieldswhen:PDUinterfaces. Can we get the best of both worlds somehow?s/eventversion.go/room_versions.go/ggiven events don't have versions..EventBuilderis pretty horrible, as the set of keys is fixed so doesn't allow adjustments with different room versions (and the IRoomVersion interface returns concreteEventBuilders.