Refactor the relevant, not yet message-based part of Consumer in tracker/consumers.py to use functions reacting to Django Channels events.
These events are created from the incoming JSON messages by the code in Consumer.receive() if the incoming message has a type, only continuing to the legacy code if this attribute is missing.
The goal is to add a type to all these command messages and write the functions handling them. Client-side code sending the commands will also need to be altered to include the type.
Message formats should be the ones defined in the Message type catalog. See also issue #1.