-
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.
Exclude PresenceMessage from BaseRealtime bundle
Now PresenceMessage only gets included if you provide the RealtimePresence module.
- Loading branch information
1 parent
e54b732
commit 954d6e7
Showing
13 changed files
with
123 additions
and
33 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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
import ProtocolMessage, { fromDeserialized } from './protocolmessage'; | ||
import { | ||
fromValues as presenceMessageFromValues, | ||
fromValuesArray as presenceMessagesFromValuesArray, | ||
} from './presencemessage'; | ||
|
||
/** | ||
`DefaultProtocolMessage` is the class returned by `DefaultRealtime`’s `ProtocolMessage` static property. It exposes the static methods that are used by the tests. | ||
*/ | ||
export class DefaultProtocolMessage extends ProtocolMessage { | ||
static fromDeserialized(deserialized: Record<string, unknown>): ProtocolMessage { | ||
return fromDeserialized(deserialized); | ||
return fromDeserialized(deserialized, { presenceMessageFromValues, presenceMessagesFromValuesArray }); | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,14 @@ | ||
export { default as RealtimePresence } from '../../../common/lib/client/realtimepresence'; | ||
import { RealtimePresenceModule } from 'common/lib/client/modulesmap'; | ||
import { default as realtimePresenceClass } from '../../../common/lib/client/realtimepresence'; | ||
import { | ||
fromValues as presenceMessageFromValues, | ||
fromValuesArray as presenceMessagesFromValuesArray, | ||
} from '../../../common/lib/types/presencemessage'; | ||
|
||
const RealtimePresence: RealtimePresenceModule = { | ||
RealtimePresence: realtimePresenceClass, | ||
presenceMessageFromValues, | ||
presenceMessagesFromValuesArray, | ||
}; | ||
|
||
export { RealtimePresence }; |
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