-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make Realtime Channel and Presence not inherit from REST
There is code that’s exclusively needed by the REST version of these classes (e.g. presence `get()`, channel `publish()`), and which, in order to reduce bundle size, we don’t want to pull in when importing the BaseRealtime class. In order to do this, we need to sever the inheritance relation between the Realtime and REST version of these classes. (It’s also worth noting that, similarly to what I mentioned in 69c35f1, the IDL doesn’t mention any inheritance relation.) The REST versions of these classes also contain functionality (channel history and presence history, channel status) that should only be available to a BaseRealtime client if the user has explicitly requested REST functionality (by importing the Rest module). So, we gate this functionality behind the Rest module (I should really have done this in 89c0761) and in doing so further reduce the bundle size of a REST-less BaseRealtime. I’ve moved the channel and presence REST code that’s also conditionally needed by Realtime into classes called RestChannelMixin and RestPresenceMixin. There’s no massively compelling reason for these classes to exist, I just thought it might be good not to dump everything directly inside the Rest module. Resolves #1489.
- Loading branch information
1 parent
9636131
commit b75eb5b
Showing
9 changed files
with
257 additions
and
160 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.