electric icon indicating copy to clipboard operation
electric copied to clipboard

Add `msgType` differentiator to `Message` interface

Open msfstef opened this issue 6 months ago • 5 comments

Currently the ChangeMessage and ControlMessage coming from upstream can only be differentiated by whether they have an action header or control header.

This has caused a less than ideal experience in branching off to manage these messages, TS type issues, and I foresee more issues with different clients implemented that will all require to differentiate between the two.

The suggestion is to add a top level property called msgType, perhaps integer based (e.g. 0 or 1) to save bandwidth, or control and change if we don't care that much. If we want this to be part of the protocol at the sync service level then doing an integer flag is probably best.

Suggestion from @samwillis and I, @KyleAMathews also expressed support for easier differentiation.

msfstef avatar Aug 06 '24 13:08 msfstef