-
Notifications
You must be signed in to change notification settings - Fork 452
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🐛 Prevent caching presence broadcasts rejected by middleware
The `Agent` stores the most recent presence broadcast sent by a client. However, it eagerly stores this before running the `receivePresence` middleware, which may actually decide that the presence broadcast is invalid (eg malformed, unauthorized, etc.). This means that the latest cached presence state may not be "legal". This change moves the caching inside the `trigger()` call, so we only store presence values that have "passed" the middleware.
- Loading branch information
1 parent
3cb6a51
commit df34bad
Showing
2 changed files
with
8 additions
and
5 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